2009/11/10 pixelcowboy <pixelcowbo...@gmail.com>: > > Hello, I want to make a field optional (blank=True), only if another > text field's options match a certain value in the admin. Is there any > way to do this? Thanks! >
This is from the top of my head, but you probably want to say null=True (i am guessing you'll leave this field empty in some cases) and blank=True on certain model field, then override models save() method to check for some conditions under which you want or do not want to allow the field to be empty. I am not sure how you would rise validation error from save() though. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---