I want to write a function 'get_user_or_log_in' to check whether the user has 
logged or not. If logged, return user's name, if not, redirect to the login 
page. I want to use it like function 'get_object_or_404'. But I do not know how 
to let  django response at my own function not just at the end of functions in 
views.py .

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1c4981ef-a3bc-40c3-a521-0287442f37b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to