I use Django ORM inside Tornado, and everything is going fine, except that "syncdb" is not working.
So this is my directory structure:
APP_NAME/ APP_NAME/ models.py settings.py __init__.py manage.py database.db
When I do python manage.py syncdb , the message shows:
Creating tables ... Installing custom SQL ... Installing indexes ... Installed 0 object(s) from 0 fixture(s)
And the database.db file is created (I use splite3), but the tables are not created. It is worth noting that if I introduced some syntax error in models.py , syncdb would complain, so it looks like syncdb can find my models.py . It just does not create tables for some reason.
For your reference, here is my settings.py parameter (the only thing I missed is SECRET_KEY):
INSTALLED_APPS = ( 'APP_NAME', ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'database.db', } }
Thanks.
PS I'm not sure if this is relevant, but I am using Python 3.3.1 + Django 1.5.1 + Tornado 3.0.1
source share