Search code examples
djangodjango-notification

Environment Error when trying to use django-notification app


I am trying to install django-notification app[1] and I get an error when I give manage.py syncdb.

The error states: EnvironmentError: NOTIFICATIONS was not found.

I have installed django-notification using setup tools successfully. This is my stack trace.

  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.

Any ideas what went wrong?

*Added settings.INSTALLED_APPS part (corrected 'django-notifications' entry to 'notification' as suggested)*

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


Solution

  • For whatever reason, you've decided to add django_notifications to settings.INSTALLED_APPS instead of notification. Fix this.