Adrian Holovaty wrote: > I'm a strong -1 on having generic-view-specific permalink functions > and template tags like this. This solution goes after the symptoms > rather than the fundamental problem, which is that the current reverse > URL implementation cannot handle multiple URL patterns for the same > view.
Right. I think we agree that naming of patterns is a good thing anyway (read my reply to Malcolm further down the thread). But talking about "urls for objects" I think it's useful as a separate feature. Just yesterday I've implemented (in a local project) a tag that actually works as a replacement for "get_absolute_url" only. I looks like this: {% object_url some_object %} It searchs through url patterns for "object_detail" views solely and exits on condition of isinstance(some_object, queryset.model). However it doesn't work for non-generic views it looks to me so much nicer than: {% url "object_view" some_object.id %} So I couldn't resist to share it :-). What do you think? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@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-developers?hl=en -~----------~----~----~----~------~----~------~--~---