Hello, I have a website where people can login and keep track of their favorite products. Whenever they login I create a session variable: 'request.session['member_id']'. If this session variable is set then I know that a user is logged in. In order to get this to work I have to send the session variable in the return statement of every view. Then in my template I have an if statement that either displays 'Login' or 'Welcome, User' depending on if 'request.session['member_id']' is True or False.
I've created custom tags before where I bring back data from a a class. However, I'm not sure how I create a custom tag to send a session variable. Because the session variable is part of a request object, and i don't know how to have my custom tag have access to the 'request'. Anybody know how I can develp this so that I don't have to send my session variable in the return statement of every view? Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

