First time here? Check out the FAQ!

Revision history  [back]

How to fix "UndefinedError: 'settings' is undefined" in git branch

Hi,

I am trying the git branch and I got the following error. Does anyone has any clue of what might go wrong ... or what should I do to fix it. The version installed using pip is working.

I have upgrade askbot based on this information: http://askbot.org/en/question/310/how-do-you-manage-askbot-and-upgrades

It looks like it is related to the database upgrade... droping all tables and recreating the database solved this problem...

    Traceback (most recent call last):
  File "passenger_wsgi.py", line 22, in application
    return application(environ, start_response)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/django/core/handlers/wsgi.py", line 241, in __call__
    response = self.get_response(request)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/django/core/handlers/base.py", line 141, in get_response
    return self.handle_uncaught_exception(request, resolver, exc_info)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/django/core/handlers/base.py", line 180, in handle_uncaught_exception
    return callback(request, **param_dict)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/django/views/defaults.py", line 24, in server_error
    return http.HttpResponseServerError(t.render(Context({})))
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/django/template/__init__.py", line 165, in render
    return self.nodelist.render(context)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/django/template/__init__.py", line 784, in render
    bits.append(self.render_node(node, context))
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/django/template/__init__.py", line 797, in render_node
    return node.render(context)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/askbot/templatetags/extra_tags.py", line 124, in render
    return jinja_template.render(context)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/coffin/template/__init__.py", line 51, in render
    return super(Template, self).render(**context)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/jinja2/environment.py", line 891, in render
    return self.environment.handle_exception(exc_info, True)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/askbot/skins/default/templates/500.jinja.html", line 1, in top-level template code
    {% extends "two_column_body.html" %}
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/askbot/skins/default/templates/two_column_body.html", line 1, in top-level template code
    {% extends "base.html" %}
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/askbot/skins/default/templates/base.html", line 4, in top-level template code
    {% spaceless %}
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/coffin/template/defaulttags.py", line 348, in _strip_spaces
    return strip_spaces_between_tags(caller().strip())
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/askbot/skins/default/templates/base.html", line 6, in template
    <title>{% block title %}{% endblock %} - {{ settings.APP_TITLE|escape }}</title>
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/jinja2/environment.py", line 371, in getattr
    return getattr(obj, attribute)

How to fix "UndefinedError: 'settings' is undefined" in git branch

Hi,

I am trying the git branch and I got the following error. Does anyone has any clue of what might go wrong ... or what should I do to fix it. The version installed using pip is working.

I have upgrade askbot based on this information: http://askbot.org/en/question/310/how-do-you-manage-askbot-and-upgrades

It looks like it is related to the database upgrade... droping all tables and recreating the database solved this problem...

    Traceback (most recent call last):
  File "passenger_wsgi.py", line 22, in application
    return application(environ, start_response)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/django/core/handlers/wsgi.py", line 241, in __call__
    response = self.get_response(request)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/django/core/handlers/base.py", line 141, in get_response
    return self.handle_uncaught_exception(request, resolver, exc_info)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/django/core/handlers/base.py", line 180, in handle_uncaught_exception
    return callback(request, **param_dict)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/django/views/defaults.py", line 24, in server_error
    return http.HttpResponseServerError(t.render(Context({})))
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/django/template/__init__.py", line 165, in render
    return self.nodelist.render(context)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/django/template/__init__.py", line 784, in render
    bits.append(self.render_node(node, context))
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/django/template/__init__.py", line 797, in render_node
    return node.render(context)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/askbot/templatetags/extra_tags.py", line 124, in render
    return jinja_template.render(context)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/coffin/template/__init__.py", line 51, in render
    return super(Template, self).render(**context)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/jinja2/environment.py", line 891, in render
    return self.environment.handle_exception(exc_info, True)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/askbot/skins/default/templates/500.jinja.html", line 1, in top-level template code
    {% extends "two_column_body.html" %}
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/askbot/skins/default/templates/two_column_body.html", line 1, in top-level template code
    {% extends "base.html" %}
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/askbot/skins/default/templates/base.html", line 4, in top-level template code
    {% spaceless %}
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/coffin/template/defaulttags.py", line 348, in _strip_spaces
    return strip_spaces_between_tags(caller().strip())
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/askbot/skins/default/templates/base.html", line 6, in template
    <title>{% block title %}{% endblock %} - {{ settings.APP_TITLE|escape }}</title>
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/jinja2/environment.py", line 371, in getattr
    return getattr(obj, attribute)

How to fix "UndefinedError: 'settings' is undefined" in git branch

Hi,

I am trying the git branch and I got the following error. Does anyone has any clue of what might go wrong ... or what should I do to fix it. The version installed using pip is working.

I have upgrade askbot based on this information: http://askbot.org/en/question/310/how-do-you-manage-askbot-and-upgrades

    Traceback (most recent call last):
  File "passenger_wsgi.py", line 22, in application
    return application(environ, start_response)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/django/core/handlers/wsgi.py", line 241, in __call__
    response = self.get_response(request)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/django/core/handlers/base.py", line 141, in get_response
    return self.handle_uncaught_exception(request, resolver, exc_info)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/django/core/handlers/base.py", line 180, in handle_uncaught_exception
    return callback(request, **param_dict)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/django/views/defaults.py", line 24, in server_error
    return http.HttpResponseServerError(t.render(Context({})))
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/django/template/__init__.py", line 165, in render
    return self.nodelist.render(context)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/django/template/__init__.py", line 784, in render
    bits.append(self.render_node(node, context))
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/django/template/__init__.py", line 797, in render_node
    return node.render(context)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/askbot/templatetags/extra_tags.py", line 124, in render
    return jinja_template.render(context)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/coffin/template/__init__.py", line 51, in render
    return super(Template, self).render(**context)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/jinja2/environment.py", line 891, in render
    return self.environment.handle_exception(exc_info, True)
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/askbot/skins/default/templates/500.jinja.html", line 1, in top-level template code
    {% extends "two_column_body.html" %}
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/askbot/skins/default/templates/two_column_body.html", line 1, in top-level template code
    {% extends "base.html" %}
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/askbot/skins/default/templates/base.html", line 4, in top-level template code
    {% spaceless %}
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/coffin/template/defaulttags.py", line 348, in _strip_spaces
    return strip_spaces_between_tags(caller().strip())
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/askbot/skins/default/templates/base.html", line 6, in template
    <title>{% block title %}{% endblock %} - {{ settings.APP_TITLE|escape }}</title>
  File "/var/www/intreaba.ubuntu.ro/lib/python2.5/site-packages/jinja2/environment.py", line 371, in getattr
    return getattr(obj, attribute)