> From: Ulrich Petri <m...@ulo.pe> > > Am 16.04.2009 um 21:12 schrieb Steve Howell: > > http://www.djangosnippets.org/snippets/1444/ > > > > In writing this code, it occurs to me that other > advanced users might > > want more control over URL resolution, and it seems to > me that a > > valuable piece of information would be the "name" of > the URL, i.e. the > > same name that gets used for reverse mappings. > Then, if folks want to > > change the dispatch of URLs in some way, they can use > the name as a > > guide for adding extra parameters, using a different > callback, etc. > > So I'm wondering if it would make sense to have > URRegexResolver have > > an alternative to resolve() called resolve_with_name() > that returns > > not just the callback and arguments, but also the > name, and I suppose > > also the regex could be useful in some cases. > > > > I've had a similar need in the past and actually posted > something > similar to djangosnippets: > http://www.djangosnippets.org/snippets/1378/ > > Now that code is obviously a hack so don't look too hard > ;) > > But I think that maybe there is a need for some kind > of > resolve_to_name functionality. >
Interesting...at least two of us were thinking along the same lines. For now I took the liberty of updating both of our snippets to reference the other in the comments. Cheers, Steve --~--~---------~--~----~------------~-------~--~----~ 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 django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---