Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
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 207.189.141.248 by p10g2000cwp.googlegroups.com with HTTP;
	Thu, 08 Feb 2007 16:31:29 +0000 (UTC)
From:  "Rob Hudson" <treborhud...@gmail.com>
To:  "Django developers" <django-developers@googlegroups.com>
Subject: Re: Fwd: passing arguments to the login_required decorator
Date: Thu, 08 Feb 2007 16:31:29 -0000
Message-ID: <1170952289.697614.288470@p10g2000cwp.googlegroups.com>
In-Reply-To: <21787a9f0702071212r49e6a2a5m622f1811f873f23@mail.gmail.com>
References: <bnFEBloO.1170850583.2976560.mike@mugwuffin.com>
   <21787a9f0702071212r49e6a2a5m622f1811f873f23@mail.gmail.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1,gzip(gfe),gzip(gfe)
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"

#3185 fixes these also: #3372, #3407 (there may be others).

That patch would make me happy.

Thanks,
Rob

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:
>
> http://code.djangoproject.com/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: django-users@googlegroups.com
>
> 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?
>
> Thanks,
>
> Mike
>
> --
> "Bureaucrat Conrad, you are technically correct -- the best kind of correct."