auth import authenticate, login def my_view(request): username = request. POST[‘username’] password = request. POST[‘password’] user = authenticate(username=username, password=password) if user is not None: if user. is_active: login(request, user) # Redirect to a success page.
Read moreHow do I create two independent admin sites in Django?
auth appliaction in my project tree, naming it differently and using separate admin. site . register() calls for both of them. This way I can have other models available in each one of them, diffrent looks, etc.
Read more