#3752: permalink documentation invalid
--------------------------------------------------------+-------------------
Reporter: Collin Grady <[EMAIL PROTECTED]> | Owner: jacob
Status: new | Component:
Documentation
Version: SVN | Keywords:
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
--------------------------------------------------------+-------------------
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)
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/3752>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---