Make one of the urls pass an argument using parentheses in the pattern. Then make that an option argument in the view function. Reverse will return one if you supply the argument, and the other if you don't.
But why not use named patterns and reverse by pattern name? In either case you have to call reverse twice to get both, but it's an unusual need and I think that you're stuck doing some view coding here anyway. On Tue, May 18, 2010 at 4:44 PM, Thomas Allen <thomasmal...@gmail.com> wrote: > If I have two URLs which resolve to the same view. Is there any way to > get both? I rely on reverse() for some "active page" logic and the > trouble is that it will only return a single URL, the first match it > has encountered. > > Thomas > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.