summaryrefslogtreecommitdiff
path: root/docs/ref/models
diff options
context:
space:
mode:
authorMarten Kenbeek <marten.knbk@gmail.com>2015-12-30 16:51:16 +0100
committerTim Graham <timograham@gmail.com>2015-12-31 14:21:29 -0500
commit16411b8400ad08f90c236bb2e18f65c655f903f8 (patch)
treedf01123093c126222e8f492512472e5834966100 /docs/ref/models
parentdf3d5b1d73699b323aac377dffab039dca26c1e4 (diff)
Fixed #26013 -- Moved django.core.urlresolvers to django.urls.
Thanks to Tim Graham for the review.
Diffstat (limited to 'docs/ref/models')
-rw-r--r--docs/ref/models/instances.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt
index e8849d7405..f1fc3e60e6 100644
--- a/docs/ref/models/instances.txt
+++ b/docs/ref/models/instances.txt
@@ -672,14 +672,14 @@ For example::
def get_absolute_url(self):
return "/people/%i/" % self.id
-(Whilst this code is correct and simple, it may not be the most portable way to
-write this kind of method. The :func:`~django.core.urlresolvers.reverse`
-function is usually the best approach.)
+While this code is correct and simple, it may not be the most portable way to
+to write this kind of method. The :func:`~django.urls.reverse` function is
+usually the best approach.
For example::
def get_absolute_url(self):
- from django.core.urlresolvers import reverse
+ from django.urls import reverse
return reverse('people.views.details', args=[str(self.id)])
One place Django uses ``get_absolute_url()`` is in the admin app. If an object