AutomaticDjangoAuthentication icon indicating copy to clipboard operation
AutomaticDjangoAuthentication copied to clipboard

help me with logout

Open chinnaphani opened this issue 5 years ago • 0 comments

here is my code in views, can you plz help me with logout session.

def loginPage(request): if request.method == 'POST': username = request.POST.get('username') password = request.POST.get('password') if get_LDAP_user(username,password) is None: return HttpResponse ('You ID does not exit') try: user = User.objects.get(username=username) except User.DoesNotExist: user = User(username=username) user.is_staff = True user.save() return HttpResponse ('You are entered') # print(user) my_context = {} return render(request,"login.html",my_context)

chinnaphani avatar Jun 01 '20 03:06 chinnaphani