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/ when i want it to go to 
http://mysite.com/web/login/

How to solve this?

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/")

@mylogin_required
def blagh(request):
   ...

I haven't figured out how to override the template path 'registration/login' yet.

--
Les Smithson <[EMAIL PROTECTED]>
Open Network Solutions Ltd

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to