On Tue, 2007-03-27 at 16:57 -0500, Adrian Holovaty wrote:
> On 3/13/07, Ivan Sagalaev <[EMAIL PROTECTED]> wrote:
> > So for "object_list" and "object_detail" I propose this syntax:
> >
> >      {% obj_url "appname.ModelName" id %}
> >      {% obj_list_url "appname.ModelName" %}
> >
> > Both GVs have their own tag that knows the actual name of a GV (like
> > "django.views.generic.list_detail.object_list"). Though I like it this
> > way it's not set in stone and may be some parameter would be better
> > (like {% url "object_detail" "appname.ModelName" %}).
> 
> 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.
> 
> I've done some thinking on this, too, and I think the cleanest way to
> solve it would be to introduce optional names for URL patterns.
> Something like this:
> 
>     url(r'^objects/$', some_view, name='object_view'),
>     url(r'^objects2/$', some_view, name='object_view2'),

I'd been slowly arriving at the same solution for a related set of
problems. I was going to whack in another optional (fourth) argument to
the tuple, but, you're right that a function call here makes things a
bit easier. So I'm in agreement here, for whatever it's worth.

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to