Override the save method on your model, something like:
class MyModel(models.Model):
field1 = models.TextField(blank=True)
field2 = models.TextField(blank=True)
def save(self):
if (self.field1 and self.field2):
raise ModelValidationError, "only one can live"
elif (not self.field1 and not self.field2):
raise ModelValidationError, "one must live"
else:
super(MyModel, self).save()
Untested code. I don't remember if ModelValidationError exists, and I
don't know if you need to tweak the signature on your save method, but
that should get you pointed in the right direction.
Cheers,
Cliff