Re: login_required decorator and user.is_active (yes, again)

2011-10-05 Thread Brian Neal
On Oct 5, 2:59 pm, ptone <pres...@ptone.com> wrote: > 13125 was wontfixed by Jacob at the end of the summer, this relates to > the login_required decorator not checking for user.is_active > > I had opened a duplicate ticket 16996 before catching it as a dupe > > I'm going

login_required decorator and user.is_active (yes, again)

2011-10-05 Thread ptone
13125 was wontfixed by Jacob at the end of the summer, this relates to the login_required decorator not checking for user.is_active I had opened a duplicate ticket 16996 before catching it as a dupe I'm going to dredge this one back up. At a minimum, the current, counter-intuitive behavior

Re: login_required

2008-11-10 Thread John-Scott Atlakson
gt; > On Mon, Nov 10, 2008 at 2:49 PM, Sebastian Bauer <[EMAIL PROTECTED]> <[EMAIL > PROTECTED]> wrote: > > > Hello, i think login_required should check that user is not only > authenticated, but also if is active. What do you think about this change? > > > > I

Re: login_required

2008-11-10 Thread Sebastian Bauer
but we can do this "little" modification in v1.1 i think this change will allow site administrator to ban users through change is_active flag Waylan Limberg pisze: > On Mon, Nov 10, 2008 at 2:49 PM, Sebastian Bauer <[EMAIL PROTECTED]> wrote: > >> Hello, i think

Re: login_required

2008-11-10 Thread Collin Grady
On Mon, Nov 10, 2008 at 11:49 AM, Sebastian Bauer <[EMAIL PROTECTED]> wrote: > Hello, i think login_required should check that user is not only > authenticated, but also if is active. What do you think about this change? I think you can write your own decorator to do that,

Re: login_required

2008-11-10 Thread Waylan Limberg
On Mon, Nov 10, 2008 at 2:49 PM, Sebastian Bauer <[EMAIL PROTECTED]> wrote: > > Hello, i think login_required should check that user is not only > authenticated, but also if is active. What do you think about this change? > I see two problems with this: 1. This current

login_required

2008-11-10 Thread Sebastian Bauer
Hello, i think login_required should check that user is not only authenticated, but also if is active. What do you think about this change? Sebastian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: Simple Generic Views, Login_Required

2007-12-27 Thread James Bennett
On Dec 27, 2007 9:22 AM, kevinski <[EMAIL PROTECTED]> wrote: > This worked great, however shouldn't there be some uniformity in how > the Login_Required argument is applied in all the generic views? This > was not the most obvious solution, and I did not see it anywhere in >

Re: Simple Generic Views, Login_Required

2007-12-27 Thread Jeremy Dunck
On Dec 27, 2007 9:22 AM, kevinski <[EMAIL PROTECTED]> wrote: > > This worked great, however shouldn't there be some uniformity in how > the Login_Required argument is applied in all the generic views? This > was not the most obvious solution, and I did not see it anywhere in &

Re: Simple Generic Views, Login_Required

2007-12-26 Thread James Bennett
On Dec 26, 2007 5:15 PM, Collin Grady <[EMAIL PROTECTED]> wrote: > However, with svn, you can inline the login_required right in urls.py; Actually that's available in 0.96 as well. And it's far better and more flexible than trying to hard-wire a 'login_required' argument into every gen

Re: Simple Generic Views, Login_Required

2007-12-26 Thread shaleh
 Nah, you just have to do what django itself does: def foo(args):     # whatever foo = login_required(foo) That is really all the magic '@' syntax does. On Wed Dec 26 15:05 , kevinski <[EMAIL PROTECTED]> wrote: That is most definitely the smartest way to do it, however we are still

Re: Simple Generic Views, Login_Required

2007-12-26 Thread Collin Grady
syntax used. However, with svn, you can inline the login_required right in urls.py; from django.views.generic import simple #... (r'^foo/$', login_required(simple.direct_to_template), info_dict), -- Collin Grady Hearts will never be practical until they can be made

Re: Simple Generic Views, Login_Required

2007-12-26 Thread kevinski
te: > 2007/12/26, kevinski <[EMAIL PROTECTED]>: > > > > > Not sure how useful this would be to the majority, but I discovered a > > need for user authentication when using the Simple Generic Views, so I > > had to add the Login_Required argument to views.generic.simpl

Re: Simple Generic Views, Login_Required

2007-12-26 Thread [EMAIL PROTECTED]
ty, but I discovered a > > need for user authentication when using the Simple Generic Views, so I > > had to add the Login_Required argument to views.generic.simple. I > > would like to recommend this tweak be added. > > Generic views are just regular methods so it would be easier

Re: Simple Generic Views, Login_Required

2007-12-26 Thread Patryk Zawadzki
2007/12/26, kevinski <[EMAIL PROTECTED]>: > > Not sure how useful this would be to the majority, but I discovered a > need for user authentication when using the Simple Generic Views, so I > had to add the Login_Required argument to views.generic.simple. I > would like to

Simple Generic Views, Login_Required

2007-12-26 Thread kevinski
Not sure how useful this would be to the majority, but I discovered a need for user authentication when using the Simple Generic Views, so I had to add the Login_Required argument to views.generic.simple. I would like to recommend this tweak be added. from django.shortcuts import

Re: passing arguments to the login_required decorator

2007-02-07 Thread Jannis Leidel
essage -- > From: Mike H <[EMAIL PROTECTED]> > 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.con

Re: login_required decorator and redirect_to

2006-12-22 Thread Rob Hudson
/password_change/', \ 'mywebsite.profile.views.password_change', \ {'template_name': 'account/pwchange.html'}), # mywebsite.profile.views.py password_change = \ login_required(django.contrib.auth.views.password_change) ... where login_required is my own custom decorator that uses

Re: login_required decorator and redirect_to

2006-12-22 Thread Kenneth Gonsalves
On 22-Dec-06, at 8:26 PM, Rob Hudson wrote: I did create my own login decorator for this site for my own views that are using it. But to use my decorator for the password views would mean duplicating (or copying) all that code. use user_passes_test - it allows you to specify the url you

Re: login_required decorator and redirect_to

2006-12-22 Thread Rob Hudson
I ran into another spot where not having my login at /accounts/login made things difficult... I'm using the password reset functionality. When the user enters their email and they get sent a password it is including a link to the password change form. When the user isn't yet logged in,

Re: login_required decorator and redirect_to

2006-12-21 Thread Rob Hudson
Karen wrote: That would certainly do the trick, and is easy enough. Thanks, Rob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to

Re: login_required decorator and redirect_to

2006-12-21 Thread Karen
I have the same kind of setup -- no profile stuff, some views that require login and rediret as appropriate, plus a direct login link on pages whenever the user isn't logged in. To get users who click on one of those links redirected to the site root, I just have this in my login template:

Re: login_required decorator and redirect_to

2006-12-21 Thread Waylan Limberg
nality and am using django.contrib.auth. I'm also providing "Login" and "Logout" links in the navigation of the site. When the user clicks on a URL who's view is decorated by login_required, they get sent to the login page and the hidden "next" form field is po

login_required decorator and redirect_to

2006-12-21 Thread Rob Hudson
"Login" and "Logout" links in the navigation of the site. When the user clicks on a URL who's view is decorated by login_required, they get sent to the login page and the hidden "next" form field is populated correctly. No problems here. But, if they click on