Opened 17 years ago

Closed 17 years ago

#3752 closed (duplicate)

permalink documentation invalid

Reported by: Collin Grady <cgrady@…> 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)

Change History (1)

comment:1 by Malcolm Tredinnick, 17 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #3540, which I'm going to fix this afternoon.

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