From 1fc5858c6fb90622900aeb2e2102a51d299c305b Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Wed, 9 Jan 2013 14:19:49 +0100 Subject: [PATCH] fix in get_here_url: generic views provide unusable url name, check for view func first --- fnpdjango/templatetags/fnp_lang.py | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fnpdjango/templatetags/fnp_lang.py b/fnpdjango/templatetags/fnp_lang.py index 006faec..5f7ac24 100644 --- a/fnpdjango/templatetags/fnp_lang.py +++ b/fnpdjango/templatetags/fnp_lang.py @@ -36,9 +36,9 @@ def get_here_url(request, lang): match = resolve(request.get_full_path()) except Resolver404: match = resolve('/') - view = match.url_name + view = match.func if view is None: - view = match.func + view = match.url_name if lang is None: lang = translation.get_language() with translation.override(lang): diff --git a/setup.py b/setup.py index 3dfd2e1..17230c9 100755 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ def whole_trees(package_dir, paths): setup( name='fnpdjango', - version='0.1.2', + version='0.1.3', author='Radek Czajka', author_email='radoslaw.czajka@nowoczesnapolska.org.pl', url = '', -- 2.20.1