Working on a Calendar app, and would like each Event model instance to have one of the {allday|start,end} fields filled out. That is, either the allday field entered, or the start+end fields, but not both.
How can I model this and have it work correctly in the admin app? I’d like one of the group to be required.
Create your model with all 3 fields, and override the clean method (called when validating the model) to check on your conditions:
More information on
clean: Model.clean()