diff options
| author | Marten Kenbeek <marten.knbk@gmail.com> | 2015-12-30 16:51:16 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-12-31 14:21:29 -0500 |
| commit | 16411b8400ad08f90c236bb2e18f65c655f903f8 (patch) | |
| tree | df01123093c126222e8f492512472e5834966100 /docs/topics/http | |
| parent | df3d5b1d73699b323aac377dffab039dca26c1e4 (diff) | |
Fixed #26013 -- Moved django.core.urlresolvers to django.urls.
Thanks to Tim Graham for the review.
Diffstat (limited to 'docs/topics/http')
| -rw-r--r-- | docs/topics/http/shortcuts.txt | 7 | ||||
| -rw-r--r-- | docs/topics/http/urls.txt | 9 |
2 files changed, 7 insertions, 9 deletions
diff --git a/docs/topics/http/shortcuts.txt b/docs/topics/http/shortcuts.txt index 8c11514507..7faef87766 100644 --- a/docs/topics/http/shortcuts.txt +++ b/docs/topics/http/shortcuts.txt @@ -103,9 +103,8 @@ This example is equivalent to:: * A model: the model's :meth:`~django.db.models.Model.get_absolute_url()` function will be called. - * A view name, possibly with arguments: :func:`urlresolvers.reverse - <django.core.urlresolvers.reverse>` will be used to reverse-resolve the - name. + * A view name, possibly with arguments: :func:`~django.urls.reverse` will be + used to reverse-resolve the name. * An absolute or relative URL, which will be used as-is for the redirect location. @@ -131,7 +130,7 @@ You can use the :func:`redirect` function in a number of ways. 2. By passing the name of a view and optionally some positional or keyword arguments; the URL will be reverse resolved using the - :func:`~django.core.urlresolvers.reverse` method:: + :func:`~django.urls.reverse` method:: def my_view(request): ... diff --git a/docs/topics/http/urls.txt b/docs/topics/http/urls.txt index 2ec66de53f..068b91bf60 100644 --- a/docs/topics/http/urls.txt +++ b/docs/topics/http/urls.txt @@ -533,8 +533,7 @@ layers where URLs are needed: * In templates: Using the :ttag:`url` template tag. -* In Python code: Using the :func:`django.core.urlresolvers.reverse` - function. +* In Python code: Using the :func:`~django.urls.reverse` function. * In higher level code related to handling of URLs of Django model instances: The :meth:`~django.db.models.Model.get_absolute_url` method. @@ -571,7 +570,7 @@ You can obtain these in template code by using: Or in Python code:: - from django.core.urlresolvers import reverse + from django.urls import reverse from django.http import HttpResponseRedirect def redirect_to_year(request): @@ -671,8 +670,8 @@ the fully qualified name into parts and then tries the following lookup: 2. If there is a current application defined, Django finds and returns the URL resolver for that instance. The current application can be specified with - the ``current_app`` argument to the - :func:`~django.core.urlresolvers.reverse()` function. + the ``current_app`` argument to the :func:`~django.urls.reverse()` + function. The :ttag:`url` template tag uses the namespace of the currently resolved view as the current application in a |
