I have the following custom model field:
script = S3EnabledFileField(bucket=settings.MEDIA_BUCKET, upload_to=...)
In my forms.py, I am using a ModelForm:
class CreateProductionForm(ModelForm):
name = forms.CharField(required=True)
class Meta:
model = Production
fields = ('name', 'script')
This makes script a required form field. How would I make script an optional field (I don’t know how to define a form field for the customized model field).
Make the change to the model and not the form, and add
blank=True: