It sounds like, for auditing purposes, there should be a model for storing each 
"hours worked" entry.

Also, the hours estimated should not be reduced in the database -- there should 
be a method of your model which returns the remaining hours by subtracting the 
sum of the worked hours from the estimated hours. This will make it easier when 
you want to look up the estimated hours.

Alternately, you can keep all your hours worked info in a list or dictionary, 
serialized with simplejson, and stored in a text field in your model. That 
would avoid the extra table, and you could use the property() keyword to create 
all the nice methods. I don't know which is better for your situation, given 
performance and how your application will be used.

Shawn

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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