﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
10363	ModelForm excluded field can still be updated	jgoldberg	nobody	"Example:
{{{
#!python
class Object(models.Model):
    field_a = models.CharField(max_length=255)
    field_b = models.CharField(max_length=255)

class ObjectForm(ModelForm):
    field_a = forms.CharField(max_length=255)

    class Meta:
        model = Object
        exclude = ['field_a']
}}}

When you initialize !ObjectForm with POST data that includes the *form* field_a, doing a save(commit=False) will return an Object with field_a containing the value from the POST data.  This doesn't seem like expected behavior: since field_a is listed in the exclude list, the data should only go into cleaned_data!['field_a'], and not the object.  An easy fix, of course, is to not name your form-specific fields with the same names as your model fields.  However, there are cases where I want to use !ModelForm, but for a couple fields I want to do manual manipulation of the form data before I update my model object."		closed	Forms	1.0		fixed			Ready for checkin	1	0	0	0	0	0
