Django RangeFields - a group of PostgreSQL specific fields Using overlap


Example

This query gets all overlapping appointments from six to ten.

Appointment.objects.filter(time_span__overlap=(6, 10))