简体   繁体   English

在Django中安装用户管理系统时,如何解决“找不到固定装置”的问题?

[英]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.

相关问题 Django和PostgreSQL“未找到装置” - Django and PostgreSQL “No Fixtures Found” 如何在用户创建按钮上修复系统中未找到的外部 ID? - how to fix External ID not found in the system on user create button? 在 Django 装置中加载 auth.user 和配置文件模型时出现 IntegrityError - IntegrityError when loading auth.user and profile models in Django fixtures 如何修复未找到的numpy模块并安装tensorflow - how to fix numpy module not found and installing tensorflow 安装Django时找不到命名模块 - No module named found when installing Django django中的图书馆管理系统 - library management system in django 如何使用会话Django管理用户和管理员? - how to management user and admin with session django? 如何使用for语句修复python图书馆管理系统到while语句? - how to fix python library management system using for sentence to while sentence? pip 命令未找到,安装 django 时在 mac 上未找到 virtualenv 命令 - pip command not found, virtualenv command not found on mac when installing django 如何在部署 Flask 应用程序时修复此 Elastic Beanstalk 错误:在您的系统上找不到 Python 3.7.0 - How do I fix this Elastic Beanstalk error when deploying a Flask app: Python 3.7.0 was not found on your system
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM