On Thu, 2007-03-08 at 08:57 -0800, dchandek wrote:
> I was happy to find the addition of the permalink decorator in the
> development version as a help in removing hardcoded paths from
> get_absolute_url() methods.
> 
> Unfortunately, using it requires that you define a custom view (even
> if the custom view simply returns a generic view). Interestingly, you
> can actually refer to a generic view in get_absolute_url():
> 
> def get_absolute_url(self):
>     return ('django.views.generic.list_detail.object_detail',
> (str(self.id),))
> get_absolute_url = permalink(get_absolute_url)
> 
> but it seems to return the first reference to that generic view in the
> URLconf. Thus, what would seem to be a common development pattern is
> disturbed: defining URLs that point to detail views "directly" using
> generic views.

Any suggestion as to how we could differentiate amongst them?

At the permalink decorator finds the first match given the view and the
parameters. If there are multiple matches, we have to make a choice
somehow, right?

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to