作者:捕鱼达人2602929461 | 来源:互联网 | 2023-10-12 07:14
Ivegotadjangoprojectwithfollowingstructure:我有一个django项目,结构如下:djninja#projectdirdj
I've got a django project with following structure:
我有一个django项目,结构如下:
/djninja # project dir
/djninja # main app dir
/bands # app dir
/fans # app dir
/lyrics # app dir
I've created a initial_data.yaml
file to make syncdb
load fixtures (I prefer YAML format). According to the documentation, I shall put it in any app fixtures
subdirectory. And so I did, I had:
我创建了一个initial_data.yaml文件来生成syncdb加载夹具(我更喜欢YAML格式)。根据文档,我将把它放在任何app fixtures子目录中。所以我做了,我有:
/djninja
/djninja
/bands
/fixtures
- initial_data.yaml
/fans
/lyrics
But syncdb was omitting the file. Then I moved it into main project directory:
但是syncdb省略了该文件。然后我将它移动到主项目目录中:
/djninja
/djninja
/fixtures
- initial_data.yaml
/bands
/fans
/lyrics
And still it is being omitted. I'd like to load fixtures within syncdb
command What am I doing wrong?
它仍被忽略。我想在syncdb命令中加载fixtures我做错了什么?
2 个解决方案