How to use inspectdb command for postgres table in Django

42 views
Skip to first unread message

Shoaib Ijaz

unread,
Apr 3, 2014, 9:27:53 AM4/3/14
to django...@googlegroups.com

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?

Reply all
Reply to author
Forward
0 new messages