You are not logged in.

Change Language:

Board >> Django >> Templates >> User profile in Template

Page: 1

Hi! I'm relatively new to Django development and I came across the need to store extra data for users in my application. I found out how to do it by using "user profiles" and everything was ok, until I realized that I have to call get_profile() for a user object several times within same template, in order to display different blocks of HTML, depending on the data i got from get_profile() members.

This poses an important question for me: does calling get_profile() , let's say, 5 times within the same template make 5 duplicate queries in the database?
Because if it does, it's not a good idea and I must find a way to cache that.
any help...anyone?


Page: 1



Please login to post a reply.



Powered by Sphene Community Tools