Django无法使用"python manage.py syncdb"创建默认表命令

编程入门 行业动态 更新时间:2024-10-26 04:29:41
本文介绍了Django无法使用"python manage.py syncdb"创建默认表命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我是Django的新手.我正在按照教程中给出的说明进行操作.当我运行 python manage.py syncdb 时,出现以下错误:

I am new to Django. I am following the instructions given in the tutorial. When I am running python manage.py syncdb, I am getting the following error:

D:\MyDev\DjnagoProject\mysite>python manage.py syncdb Traceback (most recent call last): File "manage.py", line 9, in <module> execute_from_command_line(sys.argv) File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 420, in execute_from_command_ line utility.execute() File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 359, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "C:\Python27\lib\site-packages\django\core\management\base.py", line 196, in run_from_argv self.execute(*args, **options.__dict__) File "C:\Python27\lib\site-packages\django\core\management\base.py", line 232, in execute output = self.handle(*args, **options) File "C:\Python27\lib\site-packages\django\core\management\base.py", line 371, in handle return self.handle_noargs(**options) File "C:\Python27\lib\site-packages\django\core\management\commands\syncdb.py", line 57, in handle_noargs cursor = connection.cursor() File "C:\Python27\lib\site-packages\django\db\backends\dummy\base.py", line 15, in complain raise ImproperlyConfigured("You haven't set the database ENGINE setting yet.") django.core.exceptions.ImproperlyConfigured: You haven't set the database ENGINE setting yet.

添加信息:Python版本:2.7.2,django版本:(1,4,0,'alpha',1)操作系统:Windows XP

Adding information : Python version : 2.7.2, django version : (1, 4, 0, 'alpha', 1) OS : windows XP

请让我知道我在哪里犯错.

Please let me know where I am making a mistake.

推荐答案

阅读错误消息:

配置不正确:您尚未设置数据库ENGINE设置

在您的计算机中检查 DATABASES settings.py .您至少需要 ENGINE 和数据库 NAME

Check DATABASES in your settings.py. You need at least ENGINE and database NAME

更多推荐

Django无法使用"python manage.py syncdb"创建默认表命令

本文发布于:2023-10-22 22:21:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1518897.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:命令   python   quot   Django   syncdb

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!