If a user leaves a compulsory (blank=False) field empty in the Admin app I want to check the value of a different field and depending on that value either ...

do nothing and let the system complain it needs data

or

fill in some appropriate data so it is no longer empty

I have tried doing this in clean() on the model but without luck.

On the other hand, clean() will happily insert my data if the field is adjusted to blank=True but that defeats the purpose of blank=False.

How I can make the field blank=True and raise the exact same exception to emulate blank=False if the field is left empty when my logic says it should complain?

Thanks

Mike

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to