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 |
signature.asc
Description: This is a digitally signed message part

