Skip to content

Instantly share code, notes, and snippets.

@pedroburon
Created May 8, 2012 15:59
Show Gist options
  • Save pedroburon/2636647 to your computer and use it in GitHub Desktop.
Save pedroburon/2636647 to your computer and use it in GitHub Desktop.
login context processor for django
def login_forms(request):
if not request.user.is_authenticated():
return {
'registration_form': RegistrationForm(),
'authentication_form': AuthenticationForm(),
}
return {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment