django:manage.py migrate不会迁移新安装的应用程序

时间:2016-01-14 21:45:05

标签: django python-3.x

我试图使用django-djconfig

我已按照说明操作,并将其添加到我的INSTALLED_APPS

INSTALLED_APPS = (
    'django-djconfig',
    'grappelli',

    #default apps
    'django.contrib.admin',
    'django.contrib.auth',
    ...

但是当我跑./manage.py migrate时,我得到了这个:

Operations to perform:
  Synchronize unmigrated apps: datetimewidget, haystack, grappelli, allauth, crispy_forms, webdesign, staticfiles, django_summernote, messages
  Apply all migrations: prerequisites, suggestions, comments, announcements, quest_manager, sessions, notifications, courses, auth, sites, contenttypes, account, badges, socialaccount, profile_manager, admin
Synchronizing apps without migrations:
  Creating tables...
    Running deferred SQL...
  Installing custom SQL...
Running migrations:
  No migrations to apply.

pip freeze

的结果
beautifulsoup4==4.4.1
decorator==4.0.2
defusedxml==0.4.1
Django==1.8.2
django-allauth==0.21.0
django-crispy-forms==1.4.0
django-datetime-widget==0.9.3
django-djconfig==0.5.0
django-grappelli==2.7.1
...

谁能看到我做错了什么?

2 个答案:

答案 0 :(得分:3)

它在文档中说'djconfig'而不是'django-djconfig'到INSTALLED_APPS。

答案 1 :(得分:-1)

您先试过./manage.py makemigrations吗?如果没有任何现有迁移,django将不会创建任何表。