I\'d like the login form (AuthenticationForm from django.contrib.auth) to appear on every page in my site if the user is not logged in. When the user logs in, they will be r
Using django.contrib.auth, you can put the form code in the base template like so:
All you need to do is modify the next value so instead of:
It will now be:
To access the request object, make sure you include
'django.core.context_processors.request'
in your template context processors. This way you don't have to write any context processors for logins since you are using the Django built-in views.