>     urlpatterns = patterns('',
>         (r'/([^/]+)/$', Switcher.as_view(delegates=[...])),
>         (r'/([^/]+)/([^/]+)/$', Switcher.as_view(delegates=[...])),
>         (r'/([^/]+)/([^/]+)/([^/]+)/$', Switcher.as_view(delegates=[...]))
>     )

I don't see this as an improvement because you still bind together multiple 
apps into a single urlpattern. Also wrapper views might be ugly but at least 
there are explicit and easy to understand.

What I would like to see:

urlpatterns = patterns('',
        # Standard patterns
         url(r'^admin/', include(admin.site.urls)),

        # Fallthrough patterns
        url('', include('myapp.urls'),
        url('', include('django.contrib.flatpages.urls'),
        url('', include('django.contrib.redirects.urls'),
)

Each app minds its own business and no more middleware that juggle with Http404.

> The view middleware question seems like another really good argument against 
> the proposed change...

As far as I'm concerned, Django middleware should have been deprecated 
altogether, that's certainly too late to do it now but let's not use them as an 
excuse to prevent improving the flexibility of the URL dispatcher.

-- 
Loic

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to