python manage.py syncdb Creating table auth_permission Creating table auth_group_pe-6ren">
gpt4 book ai didi

django - 为什么当我运行 "No fixtures found."命令时得到 "python manage.py syncdb"?

转载 作者:行者123 更新时间:2023-12-02 08:15:11 25 4
gpt4 key购买 nike

我运行这个:

C:\mysite>python manage.py syncdb
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_user_permissions
Creating table auth_user_groups
Creating table auth_user
Creating table auth_message
Creating table django_content_type
Creating table django_session
Creating table django_site

You just installed Django's auth system, which means you don't have any superuse
rs defined.
Would you like to create one now? (yes/no): yes
Username: balu
E-mail address: vabasu@gmail.com
Password:
Password (again):
Superuser created successfully.
Installing index for auth.Permission model
Installing index for auth.Group_permissions model
Installing index for auth.User_user_permissions model
Installing index for auth.User_groups model
Installing index for auth.Message model
No fixtures found.

最佳答案

如果你想在syncdb期间安装你的装置,我相信你需要将它们放入 <app>/fixtures/目录并调用文件 initial_data.<ext>

另请检查:

http://docs.djangoproject.com/en/dev/howto/initial-data/#automatically-loading-initial-data-fixtures

关于django - 为什么当我运行 "No fixtures found."命令时得到 "python manage.py syncdb"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3328708/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com