On 11/19/05, Jeffrey E. Forcier <[EMAIL PROTECTED]> wrote:
>
> Sune is correct--your problem stems from a misunderstanding of what a
> URL really is :) Anything after a '?' character is not truly part of
> the URL, but instead defines GET parameters which are sent to the
> resulting view.
>
> In other words, a URL (Universal Resource Locator) defines the
> location of a resource; when you send a URL to a Web server you're
> requesting the resource that exists at that location, and the GET key/
> value pairs which follow after a '?' are only ways to parameterize
> that request--they do not change which resource is being requested.
>
> Therefore, from a URLpattern's point of view, "r'^accounts/login/$'"
> does indeed match the URL '/accounts/login/?next=/add_object/', and
> attempting to do URL matching against URLs with '?' in them will not
> do you much good!
>
> If you can give us more info on what you're trying to do with the '?
> next=/whatever/' we might be able to give you tips on a more
> efficient way of doing it, with regards to Django URLconfs :)

And so it becomes very obvious that I'm new to this whole web
programming thing.  Thank you for your patient explanations!

What am I doing?  I'm just trying to make use of the @login_required decorator:

http://www.djangoproject.com/documentation/authentication/#the-login-required-decorator

I'm hoping it'll be much easier now that you've explained the error of
(at least one of) my ways :-)

Bryan

Reply via email to