Specifically, I have a Player model with a boolean field named allow_bot_to_play_for_me. I'd like to ensure that no more than 10 Players have this field set to True.
Of course I could do this in the "save" method, but if it's possible, I'd prefer to have a constraint do this. But I can't figure out if it's possible, nor how I'd do it if so.