On Mon, 2011-03-14 at 15:47 +0600, Gennadiy Zlobin wrote:
> Yes, because you will have to update age every time on person's
> birthday and
> if you forget to do it, you get the invalid data.
> 
> age = models.DateField() 

date_of_birth = models.DateField()
def age(self):
    return (datetime.datetime.today() - date_of_birth).years

(pseudo code)
-- 
regards
KG
http://lawgon.livejournal.com
Coimbatore LUG rox
http://ilugcbe.techstud.org/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to