summaryrefslogtreecommitdiff
path: root/django/core/urlresolvers.py
AgeCommit message (Collapse)Author
2017-01-17Refs #26013 -- Removed deprecated django.core.urlresolvers module.Tim Graham
2015-12-31Fixed #26013 -- Moved django.core.urlresolvers to django.urls.Marten Kenbeek
Thanks to Tim Graham for the review.
2015-10-22Fixed "URLconf" spelling in code comments.Tim Graham
2015-09-23Refs #22384 -- Removed the ability to reverse URLs by dotted path per ↵Tim Graham
deprecation timeline.
2015-09-23Refs #22218 -- Removed conf.urls.patterns() per deprecation timeline.Tim Graham
2015-09-21Corrected docstring in core.urlresolvers module.Matt Deacalion Stevens
The RegexURLResolver.resolve() method no longer returns a tuple. It has returned a ResolverMatch object since commit e0fb90b2.
2015-09-21Fixed #23813 -- Added checks for common URL pattern errorsAlasdair Nicol
Thanks jwa and lamby for the suggestions, and timgraham and jarshwah for their reviews.
2015-08-31Fixed #25331 -- Removed trailing blank lines in docstrings.Maxime Lorant
2015-06-24Renamed RemovedInDjangoXYWarnings for new roadmap.Tim Graham
Forwardport of ae1d663b7913f6da233c55409c4973248372d302 from stable/1.8.x plus more.
2015-06-06Fixed #24906 -- Fixed ResolverMatch.app_name for nested namespaces.Marten Kenbeek
Set ResolverMatch.app_name to the full path of nested application namespaces.
2015-06-05Fixed #24904 -- Fixed nested namespaces in current_app.Marten Kenbeek
Fixed reverse() to correctly handled nested namespace lookups in current_app.
2015-04-26Fixed #24707 -- Improved error reporting for explicitly imported uncallable ↵Harry
views
2015-03-18Fixed #24476 -- Added context manager/decorator for overriding script prefix.Bas Peschier
Tests were using an undocumented keyword argument for easily overriding script prefix while reversing. This is now changed into a test utility which can be used as decorator or context manager.
2015-03-13Fixed #24122 -- Redirected to translated url after setting languageClaude Paroz
Thanks gbdlin for the initial patch and Tim Graham for the review.
2015-03-12Fixed #24013 -- Fixed escaping of reverse() prefix.Bas Peschier
Prefix was treated as a part of the url pattern, which it is not. Improved tests to conform with RFC 3986 which allows certain characters in path segments without being escaped.
2015-03-12Fixed #12943 -- Allowed unnamed arguments to be propagated in includesBas Peschier
Propagated unnamed arguments as positional arguments into included URLconfs if no named arguments are defined. Positional and keyword arguments are never combined.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-02-05Simplified handling of RegexURLResolver.urlconf_module.Aymeric Augustin
Also made RegexURLResolver.url_patterns a cached property for consistency and efficiency.
2014-12-08Fixed #23968 -- Replaced list comprehension with generators and dict ↵Jon Dufresne
comprehension
2014-10-07Fixed #23522 -- Changed reverse() to return a Unicode string; not bytesJon Dufresne
2014-10-06Fixed #23601 -- Ensured view exists in URLconf before importing it in admindocs.Markus Holtermann
2014-09-05Limited lines to 119 characters in django/Tim Graham
refs #23395.
2014-08-20Prevented reverse() from generating URLs pointing to other hosts.Florian Apolloner
This is a security fix. Disclosure following shortly.
2014-07-09Fixed #22223 -- Prevented over-escaping URLs in reverse()Claude Paroz
And follow more closely the class of characters defined in the RFC 3986. Thanks Erik van Zijst for the report and the initial patch, and Tim Graham for the review.
2014-06-23Refactored common code in handlers/base.py and urlresolvers.pyAnubhav Joshi
2014-06-03Fixed #22384 -- Deprecated reversing URLs by dotted path.Tim Graham
2014-04-23Fixed #21157 -- Fixed problems with ResolverMatchKevin Christopher Henry
- Fixed bug in get_callable() that caused resolve() to put a string in ResolverMatch.func. - Made ResolverMatch.url_name match the actual url name (or None). - Updated tests that used the string value in ResolverMatch.func, and added regression tests for this bug. - Corrected test urls whose dummy view paths caused failures (behavior that was previously masked by this bug).
2014-04-23Fixed #22486 -- Restored the ability to reverse views created using ↵Preston Timmons
functools.partial. Regression in 8b93b31487d6d3b0fcbbd0498991ea0db9088054. Thanks rcoup for the report.
2014-04-21Fixed a remote code execution vulnerabilty in URL reversing.Tim Graham
Thanks Benjamin Bach for the report and initial patch. This is a security fix; disclosure to follow shortly.
2014-03-05Fixed #7571 -- Fixed parameter matching in include()'d urlpatternAthena
Fixed URL resolving in the case where an outer regex includes an inner regex and both regexes use positional parameters instead of named groups, causing the outer regex's parameters to override the inner regex's. Modified the regex url resolver so that it will concatenates and then normalizes, instead of normalizing and then concatenating.
2014-02-22Fixed #21435 -- Improved error message when urlconf is empty.Baptiste Mispelon
The new error message now hints that the most likely issue is a circular import. Thanks to trac user elena for the report and to bpeschier for the original patch.
2014-02-15Corrected a pair of flake8 violationsAlex Gaynor
2014-02-15Improved fix for #18373 -- backward compatibilityGrzegorz Nosek
Commit 79558c78 cleaned up the (undocumented) interface of Resolver404 exception, which breaks compatibility with code messing with .args[0] directly. Revert the cleanup part and simply leave the fix itself.
2014-02-15Fixed some flake8 errors from recent commits.Tim Graham
2014-02-15Fixed #18373 - improved handling of Resolver404s from viewsGrzegorz Nosek
When django.core.urlresolvers.resolve was called from a view, failed and the exception was propagated and rendered by technical_404_response, the URL mentioned on the page was the current URL instead of the URL passed to resolve(). Fixed by using the path attribute from the Resolver404 exception instead of request.path_info. Also cleaned up the exceptions to use standard named parameters instead of stuffing a dict in args[0]
2014-02-15Moved relative URL handling added in refs #21177 to a better place.Tim Graham
Thanks apollo13: "reverse() shouldn't know about absolute/relative paths."
2014-02-14Fixed #21177 -- Made resolve_url support relative URLs.Antoine Catton
This fixes redirecting to relative URLs with django.shortcuts.redirect.
2013-12-14Fixed E127 pep8 warnings.Loic Bistuer
2013-11-11Fixed #21351 -- Replaced memoize with Python's lru_cache.Bouke Haarsma
Replaced the custom, untested memoize with a similar decorator from Python's 3.2 stdlib. Although some minor performance degradation (see ticket), it is expected that in the long run lru_cache will outperform memoize once it is implemented in C. Thanks to EvilDMP for the report and Baptiste Mispelon for the idea of replacing memoize with lru_cache.
2013-11-03Fixed all E226 violationsAlex Gaynor
2013-11-02Fixed all E261 warningscoagulant
2013-11-02More attacking E302 violatorsAlex Gaynor
2013-10-26Fixed all the E203 violationsAlex Gaynor
2013-10-18Fixed #21268 -- Fixed E303 pep8 warningsAlasdair Nicol
2013-09-06Fixed #21043 -- Made resolve() handle reverse_lazy objects.Dan Johnson
Thanks Keryn Knight for the report.
2013-08-30Fixed #20989 -- Removed useless explicit list comprehensions.Simon Charette
2013-07-29Deprecated django.utils.importlibClaude Paroz
This was a shim for pre-Python 2.7 support.
2013-06-14Fixed #17076 -- When reversing a URL fails, inform the user which patterns ↵Wilfred Hughes
were tried.
2013-06-01Fixed #18169 -- NoReverseMatch not silenced if from block.superAnssi Kääriäinen
2013-05-25Fixed #19866 -- Added security logger and return 400 for SuspiciousOperation.Preston Holmes
SuspiciousOperations have been differentiated into subclasses, and are now logged to a 'django.security.*' logger. SuspiciousOperations that reach django.core.handlers.base.BaseHandler will now return a 400 instead of a 500. Thanks to tiwoc for the report, and Carl Meyer and Donald Stufft for review.