I would like to make impossible to insert data to my database if that data conflicts with some another data that already exists in my base. What I mean:
Let's say that I would like to insert into database fields start_date
and end_date
with the following condition:
-period (start_date; end_date)
cannot intersect with any other periods in my base
Is any nice and fast way to check it in django?
Possible I can iterate over whole database manually, but maybe is there any nice wrapper?