You are not logged in.

Change Language:

Profile for Annatar

Name Annatar
Email Address n/a
Posts2
  • Re: User profile in Template
    Board >> Django >> Templates
    any help...anyone?
  • User profile in Template
    Board >> Django >> Templates
    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.


Powered by Sphene Community Tools