I need an authenticated user to be able to see some of their personal details on each page of the site.
I have so far created a UserProfile class (which has a one to one relationship with the User class) in order to provide more information on the user. 1) I am able to add fields from the User class directly to a template. e.g. {{ user.email }}. However, I can't see a way to add the extra fields from the UserProfile class directly to the template, even though it has a one-to-one relationship with User. Have I missed something here? Assuming that I can't add UserProfile fields directly to the template, it seems to me I need to write a template tag to get the extra info in the UserProfile class on every page. If so, I think I have two ways to create the tag. 1) Call the DB to retrieve the UserProfile fields directly. 2) Use request.session to retrieve UserProfile fields (having pre-populated thhe UserProfile session fields when the user logs on). What are the pros and cons of each method. By using Sessions will I avoid hitting the DB as much as method 1? Cheers MerMer --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---