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
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
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
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
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
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
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:
#