为什么我在尝试运行manage.py时收到错误消息?

时间:2014-03-29 05:53:18

标签: python django postgresql cmd

尝试运行manage.py时,在cmd提示符(Windows 8)中获取错误列表。 我正在尝试遵循本教程:http://wiki.thinkhole.org/howto:django_on_windows/ 我不到教程页面的一半。 有人可以告诉我出了什么问题以及如何回到正轨? 我想在我的电脑上安装django,这样我就可以用python创建一个网页。 实际的命令提示错误日志是这样的:

C:\Py\Scripts\testproject>manage.py runserver

Traceback (most recent call last):
  File "C:\Py\Scripts\testproject\manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "C:\Py\lib\site-packages\django\core\management\__init__.py", line 399, i
n execute_from_command_line
    utility.execute()
  File "C:\Py\lib\site-packages\django\core\management\__init__.py", line 392, i
n execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Py\lib\site-packages\django\core\management\base.py", line 242, in ru
n_from_argv
    self.execute(*args, **options.__dict__)
  File "C:\Py\lib\site-packages\django\core\management\base.py", line 280, in ex
ecute
    translation.activate('en-us')
  File "C:\Py\lib\site-packages\django\utils\translation\__init__.py", line 130,
 in activate
    return _trans.activate(language)
  File "C:\Py\lib\site-packages\django\utils\translation\trans_real.py", line 18
8, in activate
    _active.value = translation(language)
  File "C:\Py\lib\site-packages\django\utils\translation\trans_real.py", line 17
7, in translation
    default_translation = _fetch(settings.LANGUAGE_CODE)
  File "C:\Py\lib\site-packages\django\utils\translation\trans_real.py", line 15
9, in _fetch
    app = import_module(appname)
  File "C:\Py\lib\site-packages\django\utils\importlib.py", line 40, in import_m
odule
    __import__(name)
  File "C:\Py\lib\site-packages\django\contrib\admin\__init__.py", line 3, in <m
odule>
    from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME
  File "C:\Py\lib\site-packages\django\contrib\admin\helpers.py", line 7, in <mo
dule>
    from django.contrib.contenttypes.models import ContentType
  File "C:\Py\lib\site-packages\django\contrib\contenttypes\models.py", line 129
, in <module>
    class ContentType(models.Model):
  File "C:\Py\lib\site-packages\django\db\models\base.py", line 96, in __new__
    new_class.add_to_class('_meta', Options(meta, **kwargs))
TypeError: Error when calling the metaclass bases
    __init__() keywords must be strings

C:\Py\Scripts\testproject>

0 个答案:

没有答案