(Update: This snippet is now maintained as a dedicated Django package: django-validate-model-attribute-assignment)

Ever done the following?

# Argh, why is this user now not a superuser...

get

Here's a dirty hack to validate these: