reg/views.py
changeset 47 e1895d2ede97
parent 46 ff5f34e42aec
child 48 9a52ca561c1d
equal deleted inserted replaced
46:ff5f34e42aec 47:e1895d2ede97
    20     If not, only show the re send activation email link.
    20     If not, only show the re send activation email link.
    21     else show all the options in homepage.
    21     else show all the options in homepage.
    22     """
    22     """
    23 
    23 
    24     user = request.user
    24     user = request.user
    25 
    25     if user.is_authenticated() and user.is_active:
    26     return render_to_response('index.html', {'user':user})
    26         registered_events = user.event_attendees.all()
       
    27     else:
       
    28         registered_events = None
       
    29 
       
    30     return render_to_response('index.html', {'user':user, 'registered_events':registered_events})
    27 
    31 
    28 def user_login(request):
    32 def user_login(request):
    29     """ get the user object from e-mail and then check for password.
    33     """ get the user object from e-mail and then check for password.
    30     """
    34     """
    31 
    35