UndefinedError: 'settings' is undefined
Hi, I'm on the current pip version on debian squeeze. The main part of the page is working, but if I e.g. want to change the "Site" via the admin interface the following error occurs:
My installation tries to render {{ settings.APP_TITLE|escape }} in /usr/local/lib/python2.6/dist-packages/askbot/templates/base.html" and throws "UndefinedError: 'settings' is undefined". Can anyone help me?
I have included this line
'askbot.context.application_settings',
in my settings in the TEMPLATE_CONTEXT_PROCESSORS which should make {{ settings}} available...
Here is the full traceback:
[Sat Dec 08 22:48:29 2012] [error][client x:x:x:x:x:x:x:x] mod_wsgi(pid=29866): Exception occurred processing WSGI script '/path/to/askbotproject/django.wsgi'.
[Sat Dec 08 22:48:29 2012] [error] [client x:x:x:x:x:x:x:x] Traceback (most recent call last):
[Sat Dec 08 22:48:29 2012] [error] [client x:x:x:x:x:x:x:x] File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/wsgi.py", line 241, in __call__
[Sat Dec 08 22:48:29 2012] [error] [client x:x:x:x:x:x:x:x] response = self.get_response(request)
[Sat Dec 08 22:48:29 2012] [error] [client x:x:x:x:x:x:x:x] File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 179, in get_response
[Sat Dec 08 22:48:29 2012] [error] [client x:x:x:x:x:x:x:x] response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
[Sat Dec 08 22:48:29 2012] [error] [client x:x:x:x:x:x:x:x] File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 228, in handle_uncaught_exception
[Sat Dec 08 22:48:29 2012] [error] [client x:x:x:x:x:x:x:x] return callback(request, **param_dict)
[Sat Dec 08 22:48:29 2012] [error] [client x:x:x:x:x:x:x:x] File "/usr/local/lib/python2.6/dist-packages/django/utils/decorators.py", line 91, in _wrapped_view
[Sat Dec 08 22:48:29 2012] [error] [client x:x:x:x:x:x:x:x] response = view_func(request, *args, **kwargs)
[Sat Dec 08 22:48:29 2012] [error] [client x:x:x:x:x:x:x:x] File "/usr/local/lib/python2.6/dist-packages/django/views/defaults.py", line 33, in server_error
[Sat Dec 08 22:48:29 2012] [error] [client x:x:x:x:x:x:x:x] return http.HttpResponseServerError(t.render(Context({})))
[Sat Dec 08 22:48:29 2012] [error] [client x:x:x:x:x:x:x:x] File "/usr/local/lib/python2.6/dist-packages/coffin/template/__init__.py", line 55, in render
[Sat Dec 08 22:48:29 2012] [error] [client x:x:x:x:x:x:x:x] return super(Template, self).render(**context)
[Sat Dec 08 22:48:29 2012] [error] [client x:x:x:x:x:x:x:x] File "/usr/local/lib/python2.6/dist-packages/jinja2/environment.py", line 894 ...
Comments
edit: Just noticed that the error also occurs when I try to show the help page.
Could you specify steps to reproduce the issue, please? Also please tell which version of askbot this issue applies to.
Hi, thanks for your reply. I'm using 0.7.44 (installed via pip).
The error occurs when I try to open the help page or if I sumit changes of the "Site" via the admin interface. I think there are more places where this happens, but these two are where I recognized it.
As I said I installed via "pip install askbot", then I ran manage.py syncdb and migrate. I added a user and wanted to change the site, but it didnt work. I also tried filling the database with dummydata but this (as expeted) also didnt change anything. If you like you can look to it on http://askbot.selfnet.de