1👍
✅
If you have the request template context processor enabled, you’ll be able to access the user in the template with {{ request.user}}
.
Secondly, make sure you are importing the login function and not the login view. It should be:
from django.contrib.auth import login
Source:stackexchange.com