Re: Errors saving blank Admin Inline with FilePathField?

2011-06-23 Thread Nan
For the reference of future generations, the following seems to work: class MyAdminForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(MyAdminForm, self).__init__(*args, **kwargs) self.fields['some_fpath_field'].choices = [('','--'),]

Errors saving blank Admin Inline with FilePathField?

2011-06-23 Thread Nan
This is driving me batty... Because there's no blank option in the form field for a FilePathField with blank=False, then if you: - Have an Admin Inline with a FilePathField and another required field - Have extra (i.e. intentionally blank) inlines in your form You will get an error upon saving