> The "ProfileForm({}, instance=profile)" is > clearly passing in empty data (the empty dictionary), and it makes > sense that Django would see the empty data, then determine that empty > data is allowed on the fields (blank=True) and set those fields to > empty data. If you want to avoid this, you have two options: don't use > "blank=True," or don't use a model form.
I agree with Adrian. Django doesn't have control over all user agents, and we know that most of them already behave in exactly the way the RFC specifies (not sending anything for blank fields) in at least some cases (checkboxes and radioboxes). I don't think writing code to special-case everything else is the right solution. If the person writing your form leaves fields off that should be present and it results in data loss, I'd treat that like any other code bug - we don't special case to save the data from views that throw a 500 because you wrote invalid Python, so I don't see why we should add a special case for when you might write incorrect HTML. -Paul -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.