Re: Another urlpatterns proposal (add method column)

2007-10-03 Thread Collin Grady
tonnzor said the following: > As far as I see, reversing url is getting URL for a view. Then, if > view has only one route, there's no need to provide HTTP method. But > if there are > 0 routes to the same view, we can add optional METHOD > option. Or just make people use named URLs, which is alr

Re: Another urlpatterns proposal (add method column)

2007-10-03 Thread tonnzor
As far as I see, reversing url is getting URL for a view. Then, if view has only one route, there's no need to provide HTTP method. But if there are > 0 routes to the same view, we can add optional METHOD option. Examples: {# typical usage: #} Goods {# exclusive usage, many routes t

Re: Another urlpatterns proposal (add method column)

2007-10-03 Thread Andrew Durdin
On 10/3/07, Simon Litchfield <[EMAIL PROTECTED]> wrote: > > However, using the new-ish urlpattern url() notation would be the go > here. Just bung a new kwarg on url.__init__() with a default of > something like None, ALL or *, that would optionally accept values > like GET, POST, HEAD, etc. Note

Re: Another urlpatterns proposal (add method column)

2007-10-03 Thread Simon Litchfield
Personally I haven't found the need for this, since I don't lay things out like that. However, using the new-ish urlpattern url() notation would be the go here. Just bung a new kwarg on url.__init__() with a default of something like None, ALL or *, that would optionally accept values like GET, P

Re: Another urlpatterns proposal (add method column)

2007-10-02 Thread Marty Alchin
On 10/2/07, Marty Alchin <[EMAIL PROTECTED]> wrote: > That said, I think there are probably others out there like you who > would want this, and there's actually nothing stopping you from > releasing it as a separate app, or even a snippet. Well, looks like I misspoke. It seems the URL resolver i

Re: Another urlpatterns proposal (add method column)

2007-10-02 Thread Marty Alchin
I can't say I'm a big fan of this proposal, personally. While I can understand where you're coming from, it smells a bit too much like J2EE's doGet/doPost stuff for my taste. On a more objective note, though, would that mean that every urlpattern would require an HTTP method, or could it be ignor

Another urlpatterns proposal (add method column)

2007-10-02 Thread tonnzor
IMHO, we should move typical logic of switching actual view according to request HTTP method from views to urls.py. Dispatching URLs using info from request is a job for urls.py, not for views itself. I think following code is inefficient and does the same as urls.py does with URL of requests: #