diff options
Diffstat (limited to 'askbot/templatetags')
-rw-r--r-- | askbot/templatetags/extra_filters_jinja.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/askbot/templatetags/extra_filters_jinja.py b/askbot/templatetags/extra_filters_jinja.py index b74502df..5be86dc2 100644 --- a/askbot/templatetags/extra_filters_jinja.py +++ b/askbot/templatetags/extra_filters_jinja.py @@ -6,6 +6,7 @@ from django.core import exceptions as django_exceptions from django.utils.translation import ugettext as _ from django.contrib.humanize.templatetags import humanize from django.template import defaultfilters +from django.core.urlresolvers import reverse from askbot import exceptions as askbot_exceptions from askbot import auth from askbot.conf import settings as askbot_settings @@ -31,6 +32,13 @@ def absolutize_urls_func(text): absolutize_urls = register.filter(absolutize_urls_func) @register.filter +def clean_login_url(url): + """pass through, unless user was originally on the logout page""" + if url == reverse('logout'): + return reverse('index') + return url + +@register.filter def country_display_name(country_code): country_dict = dict(countries.COUNTRIES) return country_dict[country_code] |