Skip to content

Commit

Permalink
Fixed #9326 - Use decorator syntax in get_absolute_url example. Thank…
Browse files Browse the repository at this point in the history
…s, timo.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12222 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
jezdez committed Jan 12, 2010
1 parent 9614b01 commit f56f6e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/ref/models/instances.txt
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,9 @@ of the view name::

from django.db.models import permalink

@models.permalink
def get_absolute_url(self):
return ('people_view', [str(self.id)])
get_absolute_url = permalink(get_absolute_url)

More details on named URL patterns are in the :ref:`URL dispatch documentation
<topics-http-urls>`.
Expand Down

0 comments on commit f56f6e9

Please sign in to comment.