| Name | Annatar |
|---|---|
| Email Address | n/a |
| Posts | 2 |
-
- 2010-07-07 13:56:53
- Re: User profile in Template
- Board >> Django >> Templates
- any help...anyone?
-
- 2010-06-27 16:31:59
- 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.


