One to many relationship with limit?

Regarding triggers, there is a third-party package, django-pgtrigger, to allow you to create triggers in Django models. (I’ve never used it, so I can’t vouch for it. However, there are a couple people whose opinions I greatly respect that think highly of it, and so I wouldn’t hesitate to try it if I had the need. See the thread at Support for database triggers?)

Regarding those constraints, I don’t think there’s a way to do it through the ORM. There are a number of limitations on what you can do with constraints, and I have the feeling that this type of constraint wouldn’t fit within those restrictions.