Loading django/core/urlresolvers.py +5 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,8 @@ a string) and returns a tuple in this format: """ from __future__ import unicode_literals import functools from importlib import import_module import re from threading import local Loading Loading @@ -269,6 +271,9 @@ class RegexURLResolver(LocaleRegexProvider): self._callback_strs.add(pattern._callback_str) elif hasattr(pattern, '_callback'): callback = pattern._callback if isinstance(callback, functools.partial): callback = callback.func if not hasattr(callback, '__name__'): lookup_str = callback.__module__ + "." + callback.__class__.__name__ else: Loading docs/releases/1.4.12.txt 0 → 100644 +14 −0 Original line number Diff line number Diff line =========================== Django 1.4.12 release notes =========================== *Under development* Django 1.4.12 fixes a regression in the 1.4.11 security release. Bugfixes ======== * Restored the ability to :meth:`~django.core.urlresolvers.reverse` views created using :func:`functools.partial()` (`#22486 <http://code.djangoproject.com/ticket/22486>`_) docs/releases/1.5.7.txt 0 → 100644 +14 −0 Original line number Diff line number Diff line ========================== Django 1.5.7 release notes ========================== *Under development* Django 1.5.7 fixes a regression in the 1.5.6 security release. Bugfixes ======== * Restored the ability to :meth:`~django.core.urlresolvers.reverse` views created using :func:`functools.partial()` (`#22486 <http://code.djangoproject.com/ticket/22486>`_) docs/releases/index.txt +2 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ Final releases .. toctree:: :maxdepth: 1 1.5.7 1.5.6 1.5.5 1.5.4 Loading @@ -35,6 +36,7 @@ Final releases .. toctree:: :maxdepth: 1 1.4.12 1.4.11 1.4.10 1.4.9 Loading tests/regressiontests/urlpatterns_reverse/urls.py +5 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ from __future__ import absolute_import from django.conf.urls import patterns, url, include from .views import empty_view, absolute_kwargs_view from .views import empty_view, empty_view_partial, empty_view_wrapped, absolute_kwargs_view other_patterns = patterns('', Loading Loading @@ -56,6 +56,10 @@ urlpatterns = patterns('', # This is non-reversible, but we shouldn't blow up when parsing it. url(r'^(?:foo|bar)(\w+)/$', empty_view, name="disjunction"), # Partials should be fine. url(r'^partial/', empty_view_partial, name="partial"), url(r'^partial_wrapped/', empty_view_wrapped, name="partial_wrapped"), # Regression views for #9038. See tests for more details url(r'arg_view/$', 'kwargs_view'), url(r'arg_view/(?P<arg1>\d+)/$', 'kwargs_view'), Loading Loading
django/core/urlresolvers.py +5 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,8 @@ a string) and returns a tuple in this format: """ from __future__ import unicode_literals import functools from importlib import import_module import re from threading import local Loading Loading @@ -269,6 +271,9 @@ class RegexURLResolver(LocaleRegexProvider): self._callback_strs.add(pattern._callback_str) elif hasattr(pattern, '_callback'): callback = pattern._callback if isinstance(callback, functools.partial): callback = callback.func if not hasattr(callback, '__name__'): lookup_str = callback.__module__ + "." + callback.__class__.__name__ else: Loading
docs/releases/1.4.12.txt 0 → 100644 +14 −0 Original line number Diff line number Diff line =========================== Django 1.4.12 release notes =========================== *Under development* Django 1.4.12 fixes a regression in the 1.4.11 security release. Bugfixes ======== * Restored the ability to :meth:`~django.core.urlresolvers.reverse` views created using :func:`functools.partial()` (`#22486 <http://code.djangoproject.com/ticket/22486>`_)
docs/releases/1.5.7.txt 0 → 100644 +14 −0 Original line number Diff line number Diff line ========================== Django 1.5.7 release notes ========================== *Under development* Django 1.5.7 fixes a regression in the 1.5.6 security release. Bugfixes ======== * Restored the ability to :meth:`~django.core.urlresolvers.reverse` views created using :func:`functools.partial()` (`#22486 <http://code.djangoproject.com/ticket/22486>`_)
docs/releases/index.txt +2 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ Final releases .. toctree:: :maxdepth: 1 1.5.7 1.5.6 1.5.5 1.5.4 Loading @@ -35,6 +36,7 @@ Final releases .. toctree:: :maxdepth: 1 1.4.12 1.4.11 1.4.10 1.4.9 Loading
tests/regressiontests/urlpatterns_reverse/urls.py +5 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ from __future__ import absolute_import from django.conf.urls import patterns, url, include from .views import empty_view, absolute_kwargs_view from .views import empty_view, empty_view_partial, empty_view_wrapped, absolute_kwargs_view other_patterns = patterns('', Loading Loading @@ -56,6 +56,10 @@ urlpatterns = patterns('', # This is non-reversible, but we shouldn't blow up when parsing it. url(r'^(?:foo|bar)(\w+)/$', empty_view, name="disjunction"), # Partials should be fine. url(r'^partial/', empty_view_partial, name="partial"), url(r'^partial_wrapped/', empty_view_wrapped, name="partial_wrapped"), # Regression views for #9038. See tests for more details url(r'arg_view/$', 'kwargs_view'), url(r'arg_view/(?P<arg1>\d+)/$', 'kwargs_view'), Loading