[英]How to fix “no fixtures found” when installing user management system in Django?
I'm trying to create a database in my first Django project (called "meu_blog"). 我正在尝试在我的第一个Django项目(称为“ meu_blog”)中创建数据库。 I've create a file called gerar_banco_de_dados.bat and type the following code inside:
我创建了一个名为gerar_banco_de_dados.bat的文件,并在其中输入以下代码:
python manage.py syncdb
pause
The code in the settings file of project "meu_blog" is: 项目“ meu_blog”的设置文件中的代码为:
DATABASES = {
'default': {
'ENGINE': 'sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'meu_blog.db', # Or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
}
}
But when I tryed to create a user management system with the following information: 但是当我尝试使用以下信息创建用户管理系统时:
•Username: admin •E-mail: admin@gmail.com •Password: 1 •Password (again): 1 •用户名:admin•电子邮件:admin@gmail.com•密码:1•密码(再次):1
I get a message saying: “no fixtures found” 我收到一条消息:“未找到固定装置”
When, instead, it should appear this message (according to the tutorial book I'm following): 相反,应该在何时出现此消息(根据我正在关注的教程书 ):
So, I'd like to know how to fix this "no fixtures found" and get the user management system installed. 因此,我想知道如何解决此“找不到固定装置”并安装用户管理系统。
I'm using Python 2.6 and Django 1.3. 我正在使用Python 2.6和Django 1.3。
Thanks in advance for any help. 在此先感谢您的帮助。
"No fixtures found" is not an error, per se. 本质上,“未找到固定装置”不是错误。 That will often show up during syncdb if you're not using
initial_data.json
fixtures for your apps (which is not required). 如果您不为应用程序使用
initial_data.json
固定装置,则通常会在syncdb期间显示该信息(这不是必需的)。 There is no problem. 没有问题。
The user system is already installed, according to your screenshots. 根据您的截图,用户系统已经安装。 The fixtures arent installed, mostly because you did not provide any.
没有安装固定装置,主要是因为您没有提供任何固定装置。 See here https://docs.djangoproject.com/en/dev/howto/initial-data/#providing-initial-data-with-fixtures
参见此处https://docs.djangoproject.com/en/dev/howto/initial-data/#providing-initial-data-with-fixtures
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.