From 16411b8400ad08f90c236bb2e18f65c655f903f8 Mon Sep 17 00:00:00 2001 From: Marten Kenbeek Date: Wed, 30 Dec 2015 16:51:16 +0100 Subject: Fixed #26013 -- Moved django.core.urlresolvers to django.urls. Thanks to Tim Graham for the review. --- docs/ref/models/instances.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/ref/models') 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 -- cgit v1.3