Opened 17 years ago

Closed 16 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: dev
Severity: Keywords: models
Cc: david@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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(self.id)])
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 17 years ago.
Documentation patch

Download all attachments as: .zip

Change History (4)

by David Reynolds, 17 years ago

Attachment: 7003-permalink-docs.diff added

Documentation patch

comment:1 by David Reynolds, 17 years ago

Owner: changed from nobody to David Reynolds

comment:2 by David Reynolds, 17 years ago

Added a quick stab at this myself.

comment:3 by Simon Greenhill, 16 years ago

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