Skip to content Skip to sidebar Skip to footer

"relation Not Found" Error When Using Django Without Syncdb

I have a small Django project with simple models. However, instead of creating my database via python manage.py syncdb I decided to create it manually and map the tables via Meta,

Solution 1:

The db_table name should be in lowercase:

db_table = 'item'

Solution 2:

Postgres converts table names to lowercase letters unless the queries have quotes around them. See for example:

http://binodsblog.blogspot.com/2011/02/postgresql-is-case-sensitive.html

Normally that detail is abstracted away by the ORM, but if you don't use syncdb, you have to manage it.

Post a Comment for ""relation Not Found" Error When Using Django Without Syncdb"