+1  A: 

I'm sure you could do it at the PostgreSQL level with a trigger, which you could add to a Django initial-SQL file so it's automatically created at syncdb.

At the Django model level, in order to get a useful answer you'll have to clarify why you're opposed to overriding the save() method, since that is currently the correct (and perhaps only) way to provide this kind of validation.

Django 1.2 will (hopefully) include a full model validation framework.

Carl Meyer
I'm opposed to overriding save because 1. this seems like a problem that someone else might have come up with a solution to, perhaps even Django itself and 2. In order to verify correctly, I will need to iterate through each member of the asclasses array to test everything individually. If there is another way, I would much prefer that one.
Christopher W. Allen-Poole
Also because overriding save won't work :) You need to check the many-to-many relation - and creating/editing/removing many-to-many relations affect a different (hidden) database table. You COULD use the 'through' argument on your m2m though ( http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ManyToManyField.through )
Jiaaro
Ah, didn't look closely enough at the models. Yeah, using the through argument on the M2M is the way to go.
Carl Meyer
+2  A: 

You could use the pre_save signal and raise an error if they do no match... The effect would be similar to overridding save (it gets called before save)

The problem is creating/deleting/updating the many-to-many relation will not trigger save (or consequentially pre_save or post_save)

Update

Try using the through argument on your many-to-many relation

That lets you manually define the intermediary table for the m2m relation, which will give you access to the signals, as well as the functions.

Then you can choose signals or overloading as you please

Jiaaro