我没能找到这个django.org网站,那么django1.7是否应该在第一次运行时自动创建超级用户?在
最后运行的是Django命令。现在命令是migrate,它似乎不会提示您创建超级用户。在
我可以通过运行python轻松地解决这个问题管理.pycreatesuperuser,但是这是一个bug还是像所有教程在第一次运行时建议您创建user一样工作?在
这就是我运行migrate时所做的。在
Operations to perform:
Apply all migrations: admin, contenttypes, auth, sessions
Running migrations:
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
Applying sessions.0001_initial... OK
这是一个新的virtualenv
,它使用了python2.7、pip和django1.7
基本上遵循与South相同的过程(至少对于标准迁移过程而言),它只是稍微简化了一些事情。在
迁移命令之后,运行
python manage.py createsuperuser
命令来创建超级用户。在另请阅读https://realpython.com/blog/python/django-migrations-a-primer/
从文档- 迁移:
https://docs.djangoproject.com/en/1.8/ref/django-admin/#migrate-app-label-migrationname
相关问题 更多 >
编程相关推荐