Re: problem with login_required decorator in python2.3

2006-03-17 Thread Kenneth Gonsalves
On Friday 17 Mar 2006 6:20 pm, Les Smithson wrote: > Write you own login_required and use that as a decorator: > > from django.views.decorators.auth import user_passes_test, > login_required > mylogin_required = user_passes_test(lambda u: not > u.is_anonymous(), login_url="/my/login/") simpler to

Re: problem with login_required decorator in python2.3

2006-03-17 Thread Kenneth Gonsalves
On Friday 17 Mar 2006 6:20 pm, Les Smithson wrote: > Write you own login_required and use that as a decorator: > > from django.views.decorators.auth import user_passes_test, > login_required > mylogin_required = user_passes_test(lambda u: not > u.is_anonymous(), login_url="/my/login/") > > @mylogi

Re: problem with login_required decorator in python2.3

2006-03-17 Thread Kenneth Gonsalves
On Friday 17 Mar 2006 5:43 pm, Amit Upadhyay wrote: > Monkey patching: > > If you find > login_requiredication/#the-login-required-decorator>decorator enough for your > needs, but do not like the /accounts/login/ url, you can edit > django/views

Re: problem with login_required decorator in python2.3

2006-03-17 Thread oggie rob
With trunk, I dealt with this by changing admin/base_site.html Just overide the userlinks block I found the relative links annoyingly limiting so I changed them to absolutes (I mean absolute according to the base directory - I didn't have any server info in them) by way of a decorator & the setti

Re: problem with login_required decorator in python2.3

2006-03-17 Thread Les Smithson
On Fri, 2006-03-17 at 17:05 +0530, Kenneth Gonsalves wrote: hi, my site is on "/web/', so for example, my home page is: http://mysite.com/web/home/ and admin is in: http://mysite.com/web/admin/ but using login_required decorator, the thing is directed to: http://mysite.com/accounts/login/ wh

Re: problem with login_required decorator in python2.3

2006-03-17 Thread Amit Upadhyay
On 3/17/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: but using login_required decorator, the thing is directed to:http://mysite.com/accounts/login/ when i want it to go tohttp://mysite.com/web/login/ How to solve this?Monkey patching: If you find login_required decorator enough for your needs,

problem with login_required decorator in python2.3

2006-03-17 Thread Kenneth Gonsalves
hi, my site is on "/web/', so for example, my home page is: http://mysite.com/web/home/ and admin is in: http://mysite.com/web/admin/ but using login_required decorator, the thing is directed to: http://mysite.com/accounts/login/ when i want it to go to http://mysite.com/web/login/ How to solve