Malcolm Tredinnick wrote:
I don't know about the rest of North America, but I'm up from my nap..On Fri, 2006-09-22 at 10:20 +0200, Simon de Haan wrote:Yeah I get it and agree with you. I prefer keeping the dispatch in the view as well, for some of the same reasons: clarity of the url map, and singleness of purpose. The fact is, there are all sorts of reasons why the view function may need to take different paths. The HTTP method is just one of them. What if I want very different code for authenticated and anonymous? Or with cookie and without cookie? I may have a valid reason for doing that micro-dispatch, but that doesn't mean we should invent a way of expressing it in the URL map. The URL map is a simple structure for associating a URL with a view. The other details about the request that may alter the processing can all be handled in the view. Frankly, the URL map is already a little overloaded for my tastes, but those overloads are for good map-related causes (the optional dictionary of view arguments is so that different URLs can map to the same view while expressing their differences, and helps make generic views useful; and the string-or-callable overload makes it easier and more natural to express what view to use). --Ned. -- Ned Batchelder, http://nedbatchelder.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers -~----------~----~----~----~------~----~------~--~--- |
- Re: Extend URL resolver support for HTTP Methods / REST... Ned Batchelder
- Re: Extend URL resolver support for HTTP Methods /... James Crasta
- Re: Extend URL resolver support for HTTP Metho... Simon de Haan
- Re: Extend URL resolver support for HTTP Metho... Russell Cloran
- Re: Extend URL resolver support for HTTP Methods /... wes
- Re: Extend URL resolver support for HTTP Metho... James Crasta
- Re: Extend URL resolver support for HTTP Metho... Malcolm Tredinnick
- Re: Extend URL resolver support for HTTP Methods /... Slowness Chen
- Re: Extend URL resolver support for HTTP Methods /... [EMAIL PROTECTED]
