--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=.
Hi,Here is my model am using to update items status.class User(models.Model)
users = models.ForeignKey(User)resources = models.ForeignKey(Resource)date_tracked = models.DateTimeField('Date Tracked')description = models.TextField()status_count_per_week = models.IntegerField()status = models.ForeignKey(Status)
class Meta:verbose_name_plural = 'Track Resources'
What i want to achieve is that:When i update the status the item first i should get the date last tracked and compare with tje current date, if the date tracked and the current date are not in the same week it should insert into a new row of status_count_per_week. If the date tracked and the current date are in the same week it should increment the value of status_count_per_week .
--