On Mon, Apr 7, 2008 at 3:49 PM, Rob Hudson <[EMAIL PROTECTED]> wrote:
>  would be much less daunting to those that haven't read the Friedl book
>  than this:
>
>     url(r'^(?P<slug>[-\w]+)/$', myview),

Note that this example is more complicated than it needs to be. I'd
write it like this:

    (r'^([-\w]+)/$', myview)

I'm -1 on having multiple ways of specifying URL patterns. One of the
points of a unified framework is to have One Clear Way to do things,
and introducing a new scheme makes things more conceptually
complicated. If we did indeed add this, then developers who wanted to
reuse Django apps would have to know both pattern syntaxes -- unless
we encouraged public-shared apps to use one particular URL pattern
scheme over the other, in which case it defeats the purpose of having
two.

Note that it's entirely possible now, without modifying any of Django
itself, to do this. Just write a wrapper around the patterns()
function that parses the syntax and creates "real" regular
expressions. Rob, if you're big on this idea, you should implement it
and upload it to djangosnippets.org.

Adrian

-- 
Adrian Holovaty
holovaty.com | djangoproject.com | everyblock.com

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