Ignore:
Timestamp:
13/12/12 13:07:05 (6 years ago)
Author:
mnagni
Message:

corrects the previous (wrong) workflow

File:
1 edited

Legend:

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

    r8688 r8712  
    66from django.contrib.auth import authenticate 
    77from django.shortcuts import render_to_response 
    8 from dj_security.login_form import LoginForm 
    98from django.core.context_processors import csrf 
    109from django.conf import settings 
     10 
    1111import logging 
     12import base64 
     13 
     14from dj_security.login_form import LoginForm 
    1215from dj_security.encoder import SecurityEncoder 
    1316 
     
    6871        context.update(csrf(request)) 
    6972        return render_to_response('login.html', context) 
     73 
     74def logged_in(request): 
     75    return _encode_authenticated_response(request, context = {})     
    7076     
    7177def _encode_authenticated_response(request, context): 
    7278    redirect_parameter = getattr(settings, 'REDIRECT_URL', 'r') 
    73     context['redirect_url'] = request.GET.get(redirect_parameter, '') 
     79    context['redirect_url'] = \ 
     80        base64.b64decode(request.session.get(redirect_parameter, ''))     
    7481    return render_to_response('logged_in.html', context) 
Note: See TracChangeset for help on using the changeset viewer.