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)
Change History (4)
by , 17 years ago
Attachment: | 7003-permalink-docs.diff added |
---|
comment:1 by , 17 years ago
Owner: | changed from | to
---|
comment:3 by , 16 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Duplicate of #7216 (which I saw first, even though it's more recent!)
Note:
See TracTickets
for help on using tickets.
Documentation patch