allow the combination of an F expression with a timedelta
|Reported by:||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||master|
|Cc:||gt4329b@…, coderanger||Triage Stage:||Accepted|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||yes||Patch needs improvement:||yes|
The proposal is to allow combining a F expression with a timedelta.
>>> longevents = Event.objects.filter(enddate__gt=F('startdate')+datetime.timedelta(days=5))
would return the events longer than 5 days.
I am attaching a first patch, which obviously needs refining.