fix in get_here_url: generic views provide unusable url name, check for view func...
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 9 Jan 2013 13:19:49 +0000 (14:19 +0100)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 9 Jan 2013 13:19:49 +0000 (14:19 +0100)
fnpdjango/templatetags/fnp_lang.py
setup.py

index 006faec..5f7ac24 100644 (file)
@@ -36,9 +36,9 @@ def get_here_url(request, lang):
             match = resolve(request.get_full_path())
         except Resolver404:
             match = resolve('/')
             match = resolve(request.get_full_path())
         except Resolver404:
             match = resolve('/')
-        view = match.url_name
+        view = match.func
         if view is None:
         if view is None:
-            view = match.func
+            view = match.url_name
         if lang is None:
             lang = translation.get_language()
         with translation.override(lang):
         if lang is None:
             lang = translation.get_language()
         with translation.override(lang):
index 3dfd2e1..17230c9 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,7 @@ def whole_trees(package_dir, paths):
 
 setup(
     name='fnpdjango',
 
 setup(
     name='fnpdjango',
-    version='0.1.2',
+    version='0.1.3',
     author='Radek Czajka',
     author_email='radoslaw.czajka@nowoczesnapolska.org.pl',
     url = '',
     author='Radek Czajka',
     author_email='radoslaw.czajka@nowoczesnapolska.org.pl',
     url = '',