How to get WFS and WFS-T layers from Geoserver to the GeoDjango?

252 views
Skip to first unread message

Ram Shrestha

unread,
Mar 31, 2014, 12:27:34 AM3/31/14
to geod...@googlegroups.com
Hi, 
Please help me setup proxy in geodjango to access geoserver WFS layers.

I had previously setup proxy in apache, with PHP using proxy.cgi written in python. Now I wan to learn GeoDjango for web application development. 

I tried to setup proxy using GeoNode's proxy.py view with url pattern of the urls.py inside proxy app. but could not get it right. What I did is. I copied proxy app from the GeoNode project and placed it inside my project. Then modified settings,py, urls and templates  as shown below.  Geoserver is running at http://localhost:8080 and the GeoDjango web app at http://localhost:8000

I heard of django-http-proxy. Can I use it for this purpose. Please point me to tutorial. 

inside settings.py-->installed apps{
'EMIS.proxy',
}

inside urls.py
urlpatterns += patterns('geonode.proxy.views',
    (r'^proxy/', 'proxy'),
    (r'^gs/rest/styles', 'geoserver_rest_proxy', dict(
        proxy_path='/gs/rest/styles', downstream_path='rest/styles')),
    (r'^gs/rest/layers', 'geoserver_rest_proxy', dict(
        proxy_path='/gs/rest/layers', downstream_path='rest/layers')),
)

inside template geoserver.html
var map;
            OpenLayers.ProxyHost = "http://localhost:8000/proxy/?url=";
            function init(){...
}

I get the error:


Reply all
Reply to author
Forward
0 new messages