How authenticate and login functions work in django -
in code below, how authenticate function validate username , password. pick actual values match against ?
from django.contrib.auth import authenticate, login def my_view(request): username = request.post['username'] password = request.post['password'] user = authenticate(username=username, password=password) if user not none: if user.is_active: login(request, user)
it takes user name , password django user table. first want create user entry in django user table.
refer following link authenticate user , know more django authentication system.
Comments
Post a Comment