Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

check auth user django

from django.conf import settings
from django.shortcuts import redirect

def my_view(request):
    if not request.user.is_authenticated:
        return redirect('%s?next=%s' % (settings.LOGIN_URL, request.path))
    # ...
Source by docs.djangoproject.com #
 
PREVIOUS NEXT
Tagged: #check #auth #user #django
ADD COMMENT
Topic
Name
1+5 =