My model is like this:
class B(Model):
parent = ForeignKey(A)
duration = DateRangeField()
title = CharField(max_length=200)
class Meta:
unique_together = ('parent', 'duration')
The above unique_together, just checks for equality in case of duration. How can I implement unique_together, so that overlapping duration doesn't get inserted into the table for Model B?
How can I make DateRangeField to include upper_bound by default in my app?