Opened 19 years ago
Closed 19 years ago
#3752 closed (duplicate)
permalink documentation invalid
| Reported by: | Owned by: | Jacob | |
|---|---|---|---|
| Component: | Documentation | Version: | dev |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
In http://www.djangoproject.com/documentation/model_api/#the-permalink-decorator it lists permalink usage as:
from django.db.models import permalink
def get_absolute_url(self):
return ('people.views.details', str(self.id))
get_absolute_url = permalink(get_absolute_url)
But that is invalid - it will try to split the string up using each character as a positional arg. It should be:
from django.db.models import permalink
def get_absolute_url(self):
return ('people.views.details', (str(self.id),))
get_absolute_url = permalink(get_absolute_url)
Note:
See TracTickets
for help on using tickets.
Duplicate of #3540, which I'm going to fix this afternoon.