Answers for "django logout user"

3

how to logout in django

from django.contrib.auth import logout

def logout_view(request):
    logout(request)
    # Redirect to a success page.
Posted by: Guest on May-15-2020
1

django logout user

def logout_request(request):
      logout(request)
      return redirect("")
Posted by: Guest on August-20-2020
0

login system in django

LOGOUT_REDIRECT_URL = 'your_url'
Posted by: Guest on January-04-2021
-1

loginrequiredmixin django

from django.contrib.auth.mixins import LoginRequiredMixin

class MyView(LoginRequiredMixin, View):
    login_url = '/login/'
    redirect_field_name = 'redirect_to'
Posted by: Guest on June-11-2020

Python Answers by Framework

Browse Popular Code Answers by Language