djang user log out code example
Example 1: django logout user
def logout_request(request):
logout(request)
return redirect("")
Example 2: import login required
from django.contrib.auth.decorators import login_required
def logout_request(request):
logout(request)
return redirect("")
from django.contrib.auth.decorators import login_required