在什么情况下应用程序可以看作是安装到syncdb还是通过shell django.conf.settings.INSTALLED_APPS,而不是sqlall命令?
下面我粘贴了我的终端输出,显示了令人困惑的情况。
$ manage.py syncdb
Syncing...
Creating tables ...
Installing custom SQL ...
Installing indexes ...
No fixtures found.
Synced:
> django.contrib.auth
> django.contrib.contenttypes
> django.contrib.sessions
> django.contrib.sites
> django.contrib.messages
> django.contrib.staticfiles
> django.contrib.admin
> django.contrib.admindocs
> django.contrib.gis
> south
> django_extensions
> debug_toolbar
> django_countries
> myapp.apps.core
Not synced (use migrations):
- tastypie
(use ./manage.py migrate to migrate these)
$ manage.py shell
In [1]: from django.conf import settings
In [2]: settings.INSTALLED_APPS
Out[2]:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'django.contrib.admindocs',
'django.contrib.gis',
'django.contrib.humanize',
'south',
'django_extensions',
'debug_toolbar',
'tastypie',
'django_countries',
'django_nose',
'myapp.apps.core',
'myapp.apps.mobile',
'myapp.apps.api']
In [3]:
Do you really want to exit ([y]/n)? y
$ manage.py sqlall myapp.apps.core
Error: App with label myapp.apps.core could not be found. Are you sure your INSTALLED_APPS setting is correct?