|
Hi,
I am really fed up in setting up and running GeoDjango. The first step was to setup the Spatial Database in PostGIS which I was really banging my head when it came to OS X. So i shifted to Ubuntu 11.10 and it seemed it was quite easy. Now having completed the post installation process, I created the required changes that need to be done in the settings.py and now i am trying to,
python manage.py sqlall world but it is returning a bunch of errors. (django-env)smaranh@ubuntu:~/geodjango$ python manage.py sqlall world
Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
utility.execute() File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command klass = load_command_class(app_name, subcommand) File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 69, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name)) File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name) File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/commands/sqlall.py", line 4, in <module> from django.core.management.sql import sql_all
File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/sql.py", line 6, in <module> from django.db import models File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/db/__init__.py", line 40, in <module>
backend = load_backend(connection.settings_dict['ENGINE']) File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/db/__init__.py", line 34, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item) File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/db/utils.py", line 92, in __getitem__ backend = load_backend(db['ENGINE'])
File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/db/utils.py", line 44, in load_backend raise ImproperlyConfigured(error_msg) django.core.exceptions.ImproperlyConfigured: 'django.contrib.gis.db.backends.postgis' isn't an available database backend.
Try using django.db.backends.XXX, where XXX is one of: 'dummy', 'mysql', 'oracle', 'postgresql_psycopg2', 'sqlite3' Error was: No module named psycopg2.extensions
Really need your help guys. Thanks & Regards Smaran Harihar _______________________________________________ postgis-users mailing list [hidden email] http://postgis.refractions.net/mailman/listinfo/postgis-users |
|
Could you post your settings.py please? I think it's a problem with the database section. Le 24 avr. 2012 19:03, "Smaran Harihar" <[hidden email]> a écrit :
Hi, _______________________________________________ postgis-users mailing list [hidden email] http://postgis.refractions.net/mailman/listinfo/postgis-users |
|
thanks for replying. I have attached the settings.py file
On Tue, Apr 24, 2012 at 10:10 AM, Nabil Servais <[hidden email]> wrote:
Thanks & Regards Smaran Harihar _______________________________________________ postgis-users mailing list [hidden email] http://postgis.refractions.net/mailman/listinfo/postgis-users |
|
how do I verify if my database is proper?
On Tue, Apr 24, 2012 at 10:14 AM, Smaran Harihar <[hidden email]> wrote:
Thanks & Regards Smaran Harihar _______________________________________________ postgis-users mailing list [hidden email] http://postgis.refractions.net/mailman/listinfo/postgis-users |
|
I think you need to change the ENGINE to use the postgresql_psycopg2 adapter
'ENGINE': 'django.contrib.gis.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. Regards On 24 April 2012 13:21, Smaran Harihar <[hidden email]> wrote: > how do I verify if my database is proper? > > > On Tue, Apr 24, 2012 at 10:14 AM, Smaran Harihar <[hidden email]> > wrote: >> >> thanks for replying. I have attached the settings.py file >> >> >> On Tue, Apr 24, 2012 at 10:10 AM, Nabil Servais <[hidden email]> >> wrote: >>> >>> Could you post your settings.py please? I think it's a problem with the >>> database section. >>> >>> Le 24 avr. 2012 19:03, "Smaran Harihar" <[hidden email]> a >>> écrit : >>>> >>>> Hi, >>>> >>>> I am really fed up in setting up and running GeoDjango. >>>> >>>> The first step was to setup the Spatial Database in PostGIS which I was >>>> really banging my head when it came to OS X. So i shifted to Ubuntu 11.10 >>>> and it seemed it was quite easy. Now having completed the post installation >>>> process, I created the required changes that need to be done in the >>>> settings.py and now i am trying to, >>>> >>>> python manage.py sqlall world >>>> >>>> but it is returning a bunch of errors. >>>> >>>> (django-env)smaranh@ubuntu:~/geodjango$ python manage.py sqlall world >>>> Traceback (most recent call last): >>>> File "manage.py", line 10, in <module> >>>> execute_from_command_line(sys.argv) >>>> File >>>> "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/__init__.py", >>>> line 443, in execute_from_command_line >>>> utility.execute() >>>> File >>>> "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/__init__.py", >>>> line 382, in execute >>>> self.fetch_command(subcommand).run_from_argv(self.argv) >>>> File >>>> "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/__init__.py", >>>> line 261, in fetch_command >>>> klass = load_command_class(app_name, subcommand) >>>> File >>>> "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/__init__.py", >>>> line 69, in load_command_class >>>> module = import_module('%s.management.commands.%s' % (app_name, >>>> name)) >>>> File >>>> "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/utils/importlib.py", >>>> line 35, in import_module >>>> __import__(name) >>>> File >>>> "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/commands/sqlall.py", >>>> line 4, in <module> >>>> from django.core.management.sql import sql_all >>>> File >>>> "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/sql.py", >>>> line 6, in <module> >>>> from django.db import models >>>> File >>>> "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/db/__init__.py", >>>> line 40, in <module> >>>> backend = load_backend(connection.settings_dict['ENGINE']) >>>> File >>>> "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/db/__init__.py", >>>> line 34, in __getattr__ >>>> return getattr(connections[DEFAULT_DB_ALIAS], item) >>>> File >>>> "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/db/utils.py", >>>> line 92, in __getitem__ >>>> backend = load_backend(db['ENGINE']) >>>> File >>>> "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/db/utils.py", >>>> line 44, in load_backend >>>> raise ImproperlyConfigured(error_msg) >>>> django.core.exceptions.ImproperlyConfigured: >>>> 'django.contrib.gis.db.backends.postgis' isn't an available database >>>> backend. >>>> Try using django.db.backends.XXX, where XXX is one of: >>>> 'dummy', 'mysql', 'oracle', 'postgresql_psycopg2', 'sqlite3' >>>> Error was: No module named psycopg2.extensions >>>> >>>> >>>> Really need your help guys. >>>> >>>> -- >>>> Thanks & Regards >>>> Smaran Harihar >>>> >>>> >>>> _______________________________________________ >>>> postgis-users mailing list >>>> [hidden email] >>>> http://postgis.refractions.net/mailman/listinfo/postgis-users >>>> >>> >>> _______________________________________________ >>> postgis-users mailing list >>> [hidden email] >>> http://postgis.refractions.net/mailman/listinfo/postgis-users >>> >> >> >> >> -- >> Thanks & Regards >> Smaran Harihar >> > > > > -- > Thanks & Regards > Smaran Harihar > > > _______________________________________________ > postgis-users mailing list > [hidden email] > http://postgis.refractions.net/mailman/listinfo/postgis-users > postgis-users mailing list [hidden email] http://postgis.refractions.net/mailman/listinfo/postgis-users |
|
No actually the answer was i need to install the psycopg2 in the virtual-env. It is finally working thanks. The solution is here http://stackoverflow.com/questions/10304367/unable-to-syncdb-in-geodjango-app#comment13263738_10304367
On Wed, Apr 25, 2012 at 6:16 AM, Travis Kirstine <[hidden email]> wrote: I think you need to change the ENGINE to use the postgresql_psycopg2 adapter Thanks & Regards Smaran Harihar _______________________________________________ postgis-users mailing list [hidden email] http://postgis.refractions.net/mailman/listinfo/postgis-users |
|
Hi, Not entirely postgis related. Is it possible to view the contents of zipped directories stored as blobs in a postgresql database without having to extract and unzip the data? Thanks.
Infoterra Ltd. Is part of the Astrium GEO-Information Services Division and a wholly owned subsidiary of Astrium, Europe's leading space systems and services specialist. _______________________________________________ postgis-users mailing list [hidden email] http://postgis.refractions.net/mailman/listinfo/postgis-users |
|
You're necessarily going to have to unzip to view things. However,
with the blob API you should be able to get access to a file handle, and with the right code could do things like view a manifest or extract individual files without pulling the whole blob over the wire to a client. P. On Wed, Apr 25, 2012 at 9:40 AM, White, Richard <[hidden email]> wrote: > Hi, > > > > Not entirely postgis related. > > > > Is it possible to view the contents of zipped directories stored as blobs in > a postgresql database without having to extract and unzip the data? > > > > Thanks. > > > > Infoterra Ltd. Is part of the Astrium GEO-Information Services Division and > a wholly owned subsidiary of Astrium, Europe's leading space systems and > services specialist. > > Disclaimer. The information contained in this e-mail and its attachments are > confidential and intended only for the use of the named addressee(s). If you > are not the intended addressee, please do not read, copy, use or disclose > this message or its attachments. If you have received this message in error, > please notify the sender immediately and delete or destroy all copies of > this message and attachments in all media. Any views or opinions expressed > are solely those of the author and do not necessarily represent those of > Infoterra Ltd and shall not form part of any binding agreement. > > Infoterra Limited a company registered in England under number 2359955 and > having its registered office at Atlas House, 41 Wembley Road, Leicester, LE3 > 1UT. VAT number GB 476 0468 27. > > P Before printing, think about the environment > > > > > > > > > > _______________________________________________ > postgis-users mailing list > [hidden email] > http://postgis.refractions.net/mailman/listinfo/postgis-users > postgis-users mailing list [hidden email] http://postgis.refractions.net/mailman/listinfo/postgis-users |
| Powered by Nabble | Edit this page |
