I am using out of the box django 1.5 authentication solution. After 
authenticated, i want to add a 'post_login_info' to the user using 
user_logged_in signal from django.contrib.auth.signals

from django.contrib.auth.signals import user_logged_in
from django.dispatch import receiver

@receiver(user_logged_in)    
def post_login_action(sender,user,request,**kwargs):
    user.post_login_info = 'post login info'
    


However, i can not retrieve user.post_login_info from request object later 
as follow:

from braces.views import LoginRequiredMixin
from django.views.generic import ListView

class MyListView(LoginRequiredMixin,ListView):
    def get_queryset(self):
        self.request.user.post_login_info  # Attribute Error: 'User' object 
has no attribute 'post_login_info'
        ...

Thank you for any suggestion. 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/596b0890-80d0-40e3-a3fb-0a5e0f30302b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to