Thursday, April 3, 2014

How to use inspectdb command for postgres table in Django

I am trying to generate Model class from postgres table, this table contain some geometry type column.

I am using following command for Model creation

python manage.py inspectdb

But facing this error

Exception: Could not find a geometry or geography column for "accommodation"."geometry"

this error generating from following file

File "C:\Python27\lib\site-packages\django\contrib\gis\db\backends\postgis\introspection.py", line 88, in get_geometry_type

But i don't know why this exception is throwing, i have checked geometry type column exists in table.

Can anyone help me to fix this issue?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2ffafc29-b227-4cad-bf4d-282b66ba52a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment