为什么我得到“没有找到固定装置”。当我运行“python manage.py syncdb”命令? [英] Why I'm getting "No fixtures found." when I run "python manage.py syncdb" command?

查看:108
本文介绍了为什么我得到“没有找到固定装置”。当我运行“python manage.py syncdb”命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行这个:

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>

If you want to have your fixtures to be installed during syncdb I believe you need to put them into <app>/fixtures/ directory and call the file initial_data.<ext>

另请参见:

http://docs.djangoproject.com/en/dev/howto/initial-data/#自动加载初始数据夹具

这篇关于为什么我得到“没有找到固定装置”。当我运行“python manage.py syncdb”命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆