Fixed #32755 -- Corrected Model.get_absolute_url() example in docs.
This commit is contained in:
parent
f7691d4812
commit
27d4573d35
|
@ -715,7 +715,7 @@ For example::
|
|||
|
||||
def get_absolute_url(self):
|
||||
from django.urls import reverse
|
||||
return reverse('people.views.details', args=[str(self.id)])
|
||||
return reverse('people-detail', kwargs={'pk' : self.pk})
|
||||
|
||||
One place Django uses ``get_absolute_url()`` is in the admin app. If an object
|
||||
defines this method, the object-editing page will have a "View on site" link
|
||||
|
|
Loading…
Reference in New Issue