src/ldt/ldt/auth/views.py
author grandjoncl
Mon, 03 Dec 2012 10:43:13 +0100
changeset 1001 c558d677ee52
parent 995 94f9d36371f6
child 1191 b6e0b1811723
permissions -rw-r--r--
Merge with 563d51c73231d32df2ed1ffce38449ef23fde80f

from django.contrib.auth import REDIRECT_FIELD_NAME
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.auth.views import login as django_login
from social_auth.views import list as social_list


def login(request, template_name='registration/login.html',
          redirect_field_name=REDIRECT_FIELD_NAME,
          authentication_form=AuthenticationForm,
          current_app=None):
    extra_context = {'social_list': social_list}
    
    return django_login(request, template_name, redirect_field_name, authentication_form, current_app, extra_context)