2010-03-24 164 views
0

我試圖用this tutorial沿下面來詳細Django的。我使用Django 1.1.1版蟒蛇manage.py runserver命令失敗

我跑

django-admin.py startproject mysite 

,它創造它應該的文件。然後我嘗試通過運行啓動服務器

python manage.py runserver 

但是這裏是我得到以下錯誤的地方。現在

Traceback (most recent call last): 
    File "manage.py", line 11, in <module> 
    execute_manager(settings) 
    File "/Library/Python/2.6/site-packages/django/core/management/__init__.py", line 362, in execute_manager 
    utility.execute() 
    File "/Library/Python/2.6/site-packages/django/core/management/__init__.py", line 303, in execute 
    self.fetch_command(subcommand).run_from_argv(self.argv) 
    File "/Library/Python/2.6/site-packages/django/core/management/base.py", line 195, in run_from_argv 
    self.execute(*args, **options.__dict__) 
    File "/Library/Python/2.6/site-packages/django/core/management/base.py", line 213, in execute 
    translation.activate('en-us') 
    File "/Library/Python/2.6/site-packages/django/utils/translation/__init__.py", line 73, in activate 
    return real_activate(language) 
    File "/Library/Python/2.6/site-packages/django/utils/translation/__init__.py", line 43, in delayed_loader 
    return g['real_%s' % caller](*args, **kwargs) 
    File "/Library/Python/2.6/site-packages/django/utils/translation/trans_real.py", line 205, in activate 
    _active[currentThread()] = translation(language) 
    File "/Library/Python/2.6/site-packages/django/utils/translation/trans_real.py", line 194, in translation 
    default_translation = _fetch(settings.LANGUAGE_CODE) 
    File "/Library/Python/2.6/site-packages/django/utils/translation/trans_real.py", line 172, in _fetch 
    for localepath in settings.LOCALE_PATHS: 
    File "/Library/Python/2.6/site-packages/django/utils/functional.py", line 273, in __getattr__ 
    return getattr(self._wrapped, name) 
AttributeError: 'Settings' object has no attribute 'LOCALE_PATHS' 

,我可以添加一個LOCALE_PATH屬性附加傷害,並設置爲一個空的元組到我的settings.py文件,但隨後只是抱怨其他設置等。我在這裏錯過了什麼?

回答

0

無法真正解釋這一點。嘗試刪除項目目錄並重新開始。

是您確實運行從設置文件目錄中的manage.py

+0

我已經添加並刪除了好幾次。我肯定在設置文件的目錄中運行manage.py。 – 2010-03-24 14:41:40

相關問題