On Sep 12, 2005, at 6:37 AM, Sokolov Yura wrote:
I have following (repeating) table structure: value=meta.TextField() (for example) time_from=meta.DateTimeField() time_to=meta.DateTimeField() How can I make a validator (called at object change or addition by generic views) to check that there isn't any other object, having: this.value=other.value and this.time_from<other.time_to and this.time_to>other.time_from (they hav the same value and overlapping time intervals) ?
You'll need to write a custom validator for that; you can find documentation of validators at http://www.djangoproject.com/ documentation/forms/#validators.
Jacob