...class order(models.Model):
http://ifacethoughts.net/2009/07/14/calculated-fields-in-django/
So perhaps the 'extra' query filter is what you need.
> --
> 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=en.
>
See this:
http://ifacethoughts.net/2009/07/14/calculated-fields-in-django/
So perhaps the 'extra' query filter is what you need.
MyModel.objects.filter(update_date__gt=F('entry_date')+timedelta(days=5))
You can't add a datetime to another datetime - you want to add a
datetime.timedelta instance instead. Out of curiosity I just tested it
on one of my models and it does work, e.g.,
MyModel.objects.filter(update_date__gt=F('entry_date')+timedelta(days=5))