0

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

xpanta
  • 8,124
  • 15
  • 60
  • 104

1 Answers1

0

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

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
  • At first I had 'notification' in my settings.INSTALLED_APPS. This is what I was getting. `raise ImproperlyConfigured('ImportError %s: %s' % (app, e.args[0])) django.core.exceptions.ImproperlyConfigured: ImportError notification: No module named notification` – xpanta Feb 23 '12 at 06:49
  • Then your assertion that django-notification was installed successfully is suspect. – Ignacio Vazquez-Abrams Feb 23 '12 at 07:07
  • Thank you. You were right. Although the app installation was successful, I had installed the wrong app. It seems that there is a `django-notifications` app in the repository which does something else. So instead of installing `django-notification` app I installed `django-notifications` app. I feel embarrassed. :-) – xpanta Feb 23 '12 at 07:26