2๐
I have used postgres specific fields like DateRangeField but in this
case, their functionality is limited as they can contain empty upper
values to mention one.
Why not just add an additional constraint to prevent empty upper values? Then you can get all of the benefits of DateRangeField.
Either way, these days we have ExclusionConstraint
for postgres, and there are examples in the docs for using ExclusionConstraint
with range fields or with two separate fields like your current model.
๐คdjangomachine
Source:stackexchange.com