This drives me mad... I'm reorganizing an existing Django project using the following structure:
[project_abc]
[app]
[core]
[app1]
admin.py
models.py
...
[app2]
admin.py
models.py
...
... etc ... there's a total of 9 apps
[rest]
... rest api stuff, non-db related ...
[mobile]
... mobile stuff, non-db related ...
[
south
tastypie
[project_abc]
settings.py
urls.py
manage.py
All apps with models that require database access have been added to settings.py:
INSTALLED_APPS = (
'django.contrib.admin',
'[app].[core].[app1]',
'[app].[core].[app2]',
...
'tastypie',
'south'
)
Each model class has a Meta class like:
class Meta:
app_label=[app] # this points to the top level above [core]
Directories [app], [core] and subsequent [app] directories have an __init__.py file in them.
When I run syncdb, it happily ignores my apps under [core] however the tables for other apps like tastypie and south get created properly.
When I run manage.py validate it returns 0 errors found
I've read probably all posts and hints on topics related to syncdb but unfortunately to no avail. I'm obviously missing something, but cannot figure out what it is....
app1,app2, etc, rather thanappfor everything?[app]used in Meta? Is it added to installed apps? Does it conatinmodel.pyfile, possible empty? can you try to add emptymodel.pyto core folder to make it django application, and add it to installed apps?