Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

loginrequiredmixin django

from django.contrib.auth.mixins import LoginRequiredMixin

class MyView(LoginRequiredMixin, View):
    login_url = '/login/'
    redirect_field_name = 'redirect_to'
Source by docs.djangoproject.com #
 
PREVIOUS NEXT
Tagged: #loginrequiredmixin #django
ADD COMMENT
Topic
Name
5+3 =