Message from discussion Fwd: passing arguments to the login_required decorator
Received: by 10.114.56.1 with SMTP id e1mr552361waa.1170952290800;
Thu, 08 Feb 2007 08:31:30 -0800 (PST)
Received: from 220.127.116.11 by p10g2000cwp.googlegroups.com with HTTP;
Thu, 08 Feb 2007 16:31:29 +0000 (UTC)
From: "Rob Hudson" <treborhud...@gmail.com>
To: "Django developers" <email@example.com>
Subject: Re: Fwd: passing arguments to the login_required decorator
Date: Thu, 08 Feb 2007 16:31:29 -0000
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:18.104.22.168) Gecko/20061204 Firefox/22.214.171.124,gzip(gfe),gzip(gfe)
Content-Type: text/plain; charset="iso-8859-1"
#3185 fixes these also: #3372, #3407 (there may be others).
That patch would make me happy.
On Feb 7, 12:12 pm, "James Bennett" <ubernost...@gmail.com> wrote:
> Forwarding this here, because the problem would go away if we could
> get some attention on ticket #3185:
> ---------- Forwarded message ----------
> From: Mike H <m...@mugwuffin.com>
> Date: Feb 7, 2007 6:16 AM
> Subject: passing arguments to the login_required decorator
> To: firstname.lastname@example.org
> Hi all,
> I am using the login_required decorator form
> django.contrib.auth.decorators, but I want to override the second
> argument which specified which url it should redirect to if the user is
> not logged in.
> I'm pretty new to python and everything I've tried so far has just
> resulted in a syntax or name error. The only solution I have working is
> to write my own decorator that calls the decorator in contrib.auth but
> that seems messy.
> How can I pass in the user to authenitcate and the login url arguments to
> the decorator directly?
> "Bureaucrat Conrad, you are technically correct -- the best kind of correct."