can used this and for the dates fields ?
Τη Τρίτη, 19 Ιανουαρίου 2016 - 8:01:36 μ.μ. UTC+2, ο χρήστης Steven Nash
έγραψε:
>
> Hi,
>
> Given an object such as:
>
> class Entry(models.Model):
> start = models.TimeField()
> end = models.TimeField()
>
> I'd like to be able to say something like:
>
> Entry.objects.filter(F('end')-F('start')__gt=time_in_minutes)
>
> Is there a way of doing this without implementing a separate duration
> field and having a setter for start and end update it?
>
> Cheers,
> Steve
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/9c7f2727-e501-4e40-9686-1bc125aa8559%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.