Ignore:
Timestamp:
21/11/12 10:46:37 (7 years ago)
Author:
mnagni
Message:

Corrects syntax erros

File:
1 edited

Legend:

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

    r8687 r8688  
    2727        context['form'] = form 
    2828        if form.is_valid(): # All validation rules pass 
    29             username = getattr(request.POST, 'username', '') 
    30             password = getattr(request.POST, 'password', '') 
     29            username = request.POST.get('username') 
     30            password = request.POST.get('password') 
    3131            LOGGER.debug("logging: %s" % (username))             
    3232            user = authenticate(username=username, password=password)              
     
    3636                    LOGGER.debug("user %s is Active" % (username))            
    3737                    context['user'] = SecurityEncoder().encode(user) 
    38                     request.auth_user = context['user'] 
     38                    request.auth_user = context.get('user') 
    3939                    return _encode_authenticated_response(request, context)          
    4040                else: 
Note: See TracChangeset for help on using the changeset viewer.