implementing OWSlib

35 views
Skip to first unread message

Tonton

unread,
Nov 5, 2010, 6:26:12 AM11/5/10
to geod...@googlegroups.com
Hello
i would like to had owslib in my geodjango project, but i don't know the good way to do it

this is the lib http://trac.gispython.org/lab/wiki/OwsLib

does i create a directory
/usr/local/lib/python2.6/dist-packages/django/contrib/owslib/ and insert the lib then add app in my settings

django.contrib.owslib

then in views or other file
from django.contrib.owslib import wms

or instead copy the lib in gis directory


What is the best practice ?

thanks for your answers 
regards

Gilles Bassière

unread,
Nov 5, 2010, 6:46:59 AM11/5/10
to geod...@googlegroups.com

Hello Tonton,

You don't need to have a module as part of django.contrib to use it
within django. You can import any module that exists on your python
path, like in any regular python module.

Simply install owslib with your package manager (easy_install, pip,
maybe apt...). This has the effect of putting the module somewhere on
your Python path. You can then import it in your django module:

from owslib import wms

Regards
--
Gilles Bassi�re - Web/GIS software engineer
http://gbassiere.free.fr/

Tonton

unread,
Nov 5, 2010, 8:32:42 AM11/5/10
to geod...@googlegroups.com
Simply install owslib with your package manager (easy_install, pip,
maybe apt...). This has the effect of putting the module somewhere on
your Python path. You can then import it in your django module:

from owslib import wms

Regards
--
Gilles Bassičre - Web/GIS software engineer
http://gbassiere.free.fr/


Ouais cool ! merci
 

cka...@googlemail.com

unread,
Nov 6, 2010, 4:25:12 AM11/6/10
to geodjango
Hi Gilles,

whats your goal to use OWSlib with django? What can be done with
django and owslib?

Cheers
Christian

Tonton

unread,
Nov 8, 2010, 4:54:35 AM11/8/10
to geod...@googlegroups.com
On Sat, Nov 6, 2010 at 9:25 AM, cka...@googlemail.com <cka...@googlemail.com> wrote:
Hi Gilles,

whats your goal to use OWSlib with django? What can be done with
django and owslib?

Cheers
Christian

 
hello
but it 's my goal to use it with geodjango !
i try to construct interactivity with my map services.
now i parse xml getcapabilites file to get layer list
 
then in few days i hope generate openLayers Js automatically from the web services
in the server side .

tonton
Reply all
Reply to author
Forward
0 new messages