Re: Injecting stuff to an existing list?

2008-11-25 Thread Steve Holden
David Zhou wrote: > On Tue, Nov 25, 2008 at 9:05 AM, Steve Holden <[EMAIL PROTECTED]> wrote: > >> David Zhou wrote: >> >>> On Tue, Nov 25, 2008 at 3:55 AM, sajal <[EMAIL PROTECTED]> wrote: >>> >> [...] >> >>> Personally, if the current age of a person is something you'll be

Re: Injecting stuff to an existing list?

2008-11-25 Thread bruno desthuilliers
On 25 nov, 10:17, sajal <[EMAIL PROTECTED]> wrote: > David/Daniel, > > Thanks a lot for the prompt responses, ill use the method as specified > by Daniel. > > I had use methods earlier for get_absolute_url and stuff, but didnt > realize i could use methods to do anything I wanted... Well...

Re: Injecting stuff to an existing list?

2008-11-25 Thread David Zhou
On Tue, Nov 25, 2008 at 9:05 AM, Steve Holden <[EMAIL PROTECTED]> wrote: > > David Zhou wrote: >> On Tue, Nov 25, 2008 at 3:55 AM, sajal <[EMAIL PROTECTED]> wrote: > [...] >> >> Personally, if the current age of a person is something you'll be >> using often, I'd add it to the model. >> > That's

Re: Injecting stuff to an existing list?

2008-11-25 Thread bruno desthuilliers
On 25 nov, 10:04, "David Zhou" <[EMAIL PROTECTED]> wrote: > On Tue, Nov 25, 2008 at 3:55 AM, sajal <[EMAIL PROTECTED]> wrote: > > Now Id like to show age of the people along with their names. > > > I have a function which can calculate age callable via calculateAge > > (p.date_of_birth) but how

Re: Injecting stuff to an existing list?

2008-11-25 Thread Thomas Kerpe
I think David meant a method in the model not a field so nothing is stored. //Thomas 2008/11/25 Steve Holden <[EMAIL PROTECTED]> > > David Zhou wrote: > > On Tue, Nov 25, 2008 at 3:55 AM, sajal <[EMAIL PROTECTED]> wrote: > [...] > > > > Personally, if the current age of a person is something

Re: Injecting stuff to an existing list?

2008-11-25 Thread Steve Holden
David Zhou wrote: > On Tue, Nov 25, 2008 at 3:55 AM, sajal <[EMAIL PROTECTED]> wrote: [...] > > Personally, if the current age of a person is something you'll be > using often, I'd add it to the model. > That's not very good advice, as the current age of a person changes with time, and you are

Re: Injecting stuff to an existing list?

2008-11-25 Thread sajal
David/Daniel, Thanks a lot for the prompt responses, ill use the method as specified by Daniel. I had use methods earlier for get_absolute_url and stuff, but didnt realize i could use methods to do anything I wanted... this is nice. Thanks On Nov 25, 4:06 pm, Daniel Roseman <[EMAIL PROTECTED]>

Re: Injecting stuff to an existing list?

2008-11-25 Thread Daniel Roseman
On Nov 25, 8:55 am, sajal <[EMAIL PROTECTED]> wrote: > Hi all i am both a Django and python noob. > > The thing is I have a database of people and need to show a widget on > all pages listing out people who are celebrating their birthday today. > > Using them in each views didnt seem right,

Re: Injecting stuff to an existing list?

2008-11-25 Thread David Zhou
On Tue, Nov 25, 2008 at 3:55 AM, sajal <[EMAIL PROTECTED]> wrote: > Now Id like to show age of the people along with their names. > > I have a function which can calculate age callable via calculateAge > (p.date_of_birth) but how do I make pass this along with the person > object? There's

Injecting stuff to an existing list?

2008-11-25 Thread sajal
Hi all i am both a Django and python noob. The thing is I have a database of people and need to show a widget on all pages listing out people who are celebrating their birthday today. Using them in each views didnt seem right, specially since later id like this portion of the page to be cached