Well, my question is a bit like this:
Suppose I have the following model, this is a simple case:
class Period(models.Model):
name = CharField(... field specs here ...)
start_date = DateTimeField(... field specs here ...)
duration = ... don't know what field should i use but this has to hold a delta ...
I would like to get objects where (start_date + duration) <now in a django request (I know that I can, in python, test as my_date_time + a_time_delta <datetime.now (), but it’s not ... I need this as part request).
How can I get it?
source
share