django authenticate(request, email=email, password=password) code example Example: django import user from django.contrib.auth.models import User