Re: passing arguments to the login_required decorator

2007-02-07 Thread Georgi Stanojevski
Mike H напиша: > 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. It's not messy to write your own. login_required only uses user_passes_test

Re: passing arguments to the login_required decorator

2007-02-07 Thread Lawrence Oluyede
> How can I pass in the user to authenitcate and the login url arguments to > the decorator directly? You can simply use your own decorator and not the Django's. Take the django login_required decorator and modify it accordingly to your needs. You need to change the LOGIN_URL constant. What's th

passing arguments to the login_required decorator

2007-02-07 Thread Mike H
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 o