Question

Hi i try to do that example http://openlayers.org/dev/examples/all-overlays.html in my django application. I use test server. To access roads.json file in urls.py i wrote

(r'^data/(?P<path>.*)$', 'django.views.static.serve',
    {'document_root': '/home/xaver/geodjango/data'}),

I changed the html page so that it displays map created by OpenLayer (according text of example), picture located in directory data and also html uses CSS file located in data directory. With picture and CSS file all runs normally, but there is no map (just empty rectangle like when picture on server not found). When I write in the address bar of browser http://127.0.0.1:8000/data/1.png i see my image, http://127.0.0.1:8000/data/style.css i see CSS file, but when i write http://127.0.0.1:8000/data/roads.json browser says that the contents of a binary file and that it can save.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top