model = User
# do something that validates your data
print ' I am here... '
.... SOME CODE ....
form = MyUserAdminForm
I put this in admin.py, and I've registered my admin.ModelAdmin code. The
display is fine.
The code above should fail because it doesn't return
self.cleaned_data["is_active"]. But when I reload the development server,
and changed the flag on some users, Django didn't complain, so this piece
of code is not used.
My requirement is to check that the user under change is not a superuser. I
have other things to do within that validation, but you get the idea.
Why is this?
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/GkbElmp44loJ.
To post to this group, send email to firstname.lastname@example.org.
To unsubscribe from this group, send email to email@example.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.