python manage.py schemamigration,找不到!schemamigration

x631084848 发布于 2013/08/29 10:11
阅读 1K+
收藏 0
python manage.py schemamigration,找不到!schemamigration 
1 分钟前 提问者悬赏:5分 | x631084848 | 分类:python | 浏览1次

python manage.py schemamigration app_name --initial
我在我的INSTALLED_APPS 中添加 了 south  后  syncdb 了服务,提示
Not synced (use migrations):
 -
(use ./manage.py migrate to migrate these)
于是乎用 python manage.py schemamigration app_name --initial 
将在每个app的目录下创建migration目录和相应的文件
可说报  Unknown command: 'schemamigration'
             Type 'manage.py help' for usage.
这可如何是好啊
加载中
0
hongshenghe
hongshenghe
setting 没有加载对应的应用
0
BeginMan
BeginMan

在setting INSTALLED_APPS中添加:

INSTALLED_APPS = (
    'django.contrib.admin', 
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    # Uncomment the next line to enable the admin:
    # 'django.contrib.admin',
    # Uncomment the next line to enable admin documentation:
    # 'django.contrib.admindocs',
    'south',        #第三方app 替换django自带的syncdb
)

0
self001
self001

估计是你没有指定settings,试试 python manage.py schemamigration appname --initial --settings=settings.development(这里的setting.development就是你启动项目的配置文件,可以改成你自己的)
还可以看看这篇文章,希望能帮到你

http://ddtcms.com/blog/archive/2012/12/27/66/use-south-migrate-django-project-database/

返回顶部
顶部