I have a simple model that includes two DateField fields. I have
everything passing to the template, as I would like but i'd like to
add one more variable, duration. I want {{ duration }} to be that of
the delta between the two DateField fields, in years. It's simple
arithmetic but im not sure where to implement this logic. This is on a
per object basis but it seems to me that I'd want to apply this logic
at the model level, since it's a constant (i'll reference it anytime i
call on this object(s)).Any pointers on where to begin? I suppose I can break this down in a view but im not sure how to unpack the QuertSet, add the new context variable to each object and then wrap it back up into a QuerySet. If thats even the right way to do it. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

