From: Radek Czajka Date: Wed, 9 Jan 2013 13:19:49 +0000 (+0100) Subject: fix in get_here_url: generic views provide unusable url name, check for view func... X-Git-Tag: 0.1.5~4 X-Git-Url: https://git.mdrn.pl/fnpdjango.git/commitdiff_plain/1fc5858c6fb90622900aeb2e2102a51d299c305b?hp=6d8e536282ff7e20950f36321989c94d6e44b363 fix in get_here_url: generic views provide unusable url name, check for view func first --- 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 = '',