Ignore:
Timestamp:
07/11/12 10:58:47 (7 years ago)
Author:
mnagni
Message:

Introduced two optional configurable parameters: COOKIE_DOMAIN, REDIRECT_URL

File:
1 moved

Legend:

Unmodified
Added
Removed
  • mauRepo/dj_security/trunk/dj_security/views/dj_security_login.py

    r8674 r8678  
    88from dj_security.login_form import LoginForm 
    99from django.core.context_processors import csrf 
     10from django.conf import settings 
    1011import logging 
    1112 
     
    1920    return render_to_response('login.html', context) 
    2021 
    21 def my_login(request):        
     22def login(request):        
    2223    context = {} 
    2324    if request.method == 'POST': # If the form has been submitted... 
     
    3132                if user.is_active: 
    3233                    login(request, user) 
    33                     context['r'] = request.GET.get('r', '') 
     34                    redirect_parameter = getattr(settings, 'REDIRECT_URL', 'r') 
     35                    context['redirect_url'] = request.GET.get(redirect_parameter, '') 
    3436                    return render_to_response('logged_in.html', context)             
    3537                else: 
Note: See TracChangeset for help on using the changeset viewer.