Fwd: passing arguments to the login_required decorator

23 views
Skip to first unread message

James Bennett

unread,
Feb 7, 2007, 3:12:57 PM2/7/07
to django-d...@googlegroups.com
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 <mi...@mugwuffin.com>
Date: Feb 7, 2007 6:16 AM
Subject: passing arguments to the login_required decorator
To: django...@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."

Jannis Leidel

unread,
Feb 7, 2007, 6:32:25 PM2/7/07
to django-d...@googlegroups.com
+1 from me, the silent reader

Rob Hudson

unread,
Feb 8, 2007, 11:31:29 AM2/8/07
to Django developers
#3185 fixes these also: #3372, #3407 (there may be others).

That patch would make me happy.

Thanks,
Rob

Reply all
Reply to author
Forward
0 new messages