I have a project structured as follows:
project/ __init__.py db/ models/ __init__.py article.py project.py ontology/ __init__.py coded.py
This is a bit more, but this idea. models.__init__.py contains:
from db.models.article import * from db.models.project import * from db.models.ontology.coded import *
When syncdb starts, it ignores all models imported into models.__init__.py . There is no ImportError , and when you add a print statement to __init__.py it successfully prints the import models (when syncdb starts).
Models defined in __init__.py work.
Why? Can I get syncdb to account for my imported models?
Edit: The application is in INSTALLED_APPS:
INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'amcatnavigator.navigator', 'amcatnavigator.db', )
Thanks!
source share