执行python manage.py syncdb,报Unknown command: 'syncdb'
2016-12-14 21:57
579 查看
D:\Python27\Lib\site-packages\django\bin\T_project>python manage.py syncdb
Unknown command: 'syncdb'
Type 'manage.py help' for usage.
解决方案:
在Django 1.9及未来的版本种使用migrate代替syscdb
D:\Python27\Lib\site-packages\django\bin\T_project>python manage.py migrate
Operations to perform:
Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
Applying admin.0002_logentry_remove_auto_add... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
Applying auth.0007_alter_validators_add_error_messages... OK
Applying auth.0008_alter_user_username_max_length... OK
Applying sessions.0001_initial... OK
Unknown command: 'syncdb'
Type 'manage.py help' for usage.
解决方案:
在Django 1.9及未来的版本种使用migrate代替syscdb
D:\Python27\Lib\site-packages\django\bin\T_project>python manage.py migrate
Operations to perform:
Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
Applying admin.0002_logentry_remove_auto_add... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
Applying auth.0007_alter_validators_add_error_messages... OK
Applying auth.0008_alter_user_username_max_length... OK
Applying sessions.0001_initial... OK
相关文章推荐
- python manage.py syncdb Unknown command: 'syncdb'问题解决方法
- 执行manage.py syncdb提示Unknown command: 'syncdb'
- Django执行python manage.py syncdb时,出行No module named MySQLdb问题解决方法
- django manage.py Unknown command: 'runfcgi'
- python——python manage.py runserver执行错误
- django使用python manage.py syncdb注意事项
- python manage.py runserver 8002执行成功却不能显示网页
- 执行 python manage.py runserver 0.0.0.0:8080 时报错
- Python—Django配置问题:Unknown command: 'syncdb'
- Django中修改DATABASES后,执行python manage.py ****报错!UnicodeEncodeError
- 运行python manage.py syncdb时出现“cannot connect to MySQL server on 'localhost'”的解决方法
- SAE如何线上执行Django的“manage.py syncdb”来同步数据库
- linux后台执行./run.py提示python syntax error near unexpected token `('
- Unknown command: 'makemigrations' Type 'manage.py help' for usage.
- win7 32bit python2.7 python manage.py syncdb -> No module named MySQLdb
- 执行python manage.py runserver 0.0.0.0:8000,出现以下问题
- python manag.py syncdb不能成功创建表 Run 'manage.py makemigrations' to make new migrations,
- mysql导入数据出现--unknown command '\'
- python异常:error: command 'gcc' failed: No such file or directory
- 【linux】终端直接执行py文件,不需要python命令