Opened 10 years ago

Closed 10 years ago

#7003 closed (duplicate)

Permalink documentation doesn't mention you can use named urls

Reported by: David Reynolds Owned by: David Reynolds
Component: Documentation Version: master
Severity: Keywords: models
Cc: david@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


I think it would be useful to mention in the permalink documentation in model-api that you can use a named url in place of a view name.

So, for example:

def get_absolute_url(self):
    return ('people_detail', [str(])
get_absolute_url = permalink(get_absolute_url)

Would find a url like this:

url(r'^people/(\d+)/$', 'people.views.details', name='people_detail'),

Attachments (1)

7003-permalink-docs.diff (1012 bytes) - added by David Reynolds 10 years ago.
Documentation patch

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by David Reynolds

Attachment: 7003-permalink-docs.diff added

Documentation patch

comment:1 Changed 10 years ago by David Reynolds

Owner: changed from nobody to David Reynolds

comment:2 Changed 10 years ago by David Reynolds

Added a quick stab at this myself.

comment:3 Changed 10 years ago by Simon Greenhill

Resolution: duplicate
Status: newclosed

Duplicate of #7216 (which I saw first, even though it's more recent!)

Note: See TracTickets for help on using tickets.
Back to Top