0
我想安裝Django通知應用程序[1],當我給manage.py syncdb
時出現錯誤。試圖使用Django通知應用程序的環境錯誤
的錯誤狀態:EnvironmentError: NOTIFICATIONS was not found.
我一直在使用設置工具成功安裝Django的通知。這是我的堆棧跟蹤。
File "C:\Tools\Python26\lib\site-packages\django\core\management\__init__.py",
line 438, in execute_manager
utility.execute()
File "C:\Tools\Python26\lib\site-packages\django\core\management\__init__.py",
line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Tools\Python26\lib\site-packages\django\core\management\base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "C:\Tools\Python26\lib\site-packages\django\core\management\base.py", line 219, in execute
self.validate()
File "C:\Tools\Python26\lib\site-packages\django\core\management\base.py", line 249, in validate
num_errors = get_validation_errors(s, app)
File "C:\Tools\Python26\lib\site-packages\django\core\management\validation.py", line 36, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "C:\Tools\Python26\lib\site-packages\django\db\models\loading.py", line 146, in get_app_errors
self._populate()
File "C:\Tools\Python26\lib\site-packages\django\db\models\loading.py", line 61, in _populate
self.load_app(app_name, True)
File "C:\Tools\Python26\lib\site-packages\django\db\models\loading.py", line 78, in load_app
models = import_module('.models', app_name)
File "C:\Tools\Python26\lib\site-packages\django\utils\importlib.py", line 35, in import_module
__import__(name)
File "build\bdist.win32\egg\django_notifications\models.py", line 20, in <module>
File "build\bdist.win32\egg\django_notifications\backends\__init__.py", line 23, in get_available_backends
File "build\bdist.win32\egg\django_notifications\backends\__init__.py", line 90, in get_class_instance_by_key
File "build\bdist.win32\egg\django_notifications\backends\xmpp.py", line 33, in __init__
File "build\bdist.win32\egg\django_notifications\backends\__init__.py", line 5
5, in get_settings
EnvironmentError: NOTIFICATIONS was not found.
任何想法出了什麼問題?
*新增settings.INSTALLED_APPS部分(校正 'Django的通知' 進入的建議 '通知')*
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'grappelli',
'filebrowser',
'tinymce',
'south',
'avatar',
'django.contrib.admin',
'notification',
'myproject.main',
)
[1] https://github.com/jtauber/django-notification
起初我在我的settings.INSTALLED_APPS中有'notification'。這就是我所得到的。 '提高不適當配置('ImportError%s:%s'%(app,e.args [0]))django.core.exceptions.ImproperlyConfigured:ImportError通知:沒有模塊 named notification' – xpanta 2012-02-23 06:49:57
然後你聲明django-notification是安裝成功是可疑的。 – 2012-02-23 07:07:10
謝謝。你是對的。雖然應用安裝成功,但我安裝了錯誤的應用。似乎在存儲庫中有一個'django-notifications'應用程序可以做其他事情。因此,我沒有安裝'django-notification'應用程序,而是安裝了'django-notifications'應用程序。我感到尷尬。 :-) – xpanta 2012-02-23 07:26:52