settings.LOGIN_URL 默认是/accounts/login/

def lockIndex(req):
         print '---------lockIndex--------------'
         from django.conf import settings
         print req.user
         print settings.LOGIN_URL
         print '---------lockIndex--------------'
         return render_to_response('lockIndex.html')

---------lockIndex--------------
admin
/accounts/login/
---------lockIndex--------------
原文地址:https://www.cnblogs.com/hzcya1995/p/13348987.html