[Fixed]-How to allow submission of empty string in django forms?

1👍

You might need to do a little manual work, like this:

# in the views.py
if form.is_valid():
    new_example = form.save(commit=False)
    if not form.cleaned_data['comment']:
      new_example.comment = ""
      new_example.save()

Leave a comment