﻿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
32506	exclude = '__all__' treated as an iterable in fields_for_model	Quentin	nobody	"While `exclude = '__all__'` is accepted in `ModelForm.Meta`, the `exclude` parameter to `forms.models.fields_for_model` is assumed to be a list of field names.
This leads to the following behaviour:

{{{#!python
class TestModel(models.Model):
    all_ = models.CharField(max_length=10)
    name  = models.CharField(max_length=10)

class TestForm(forms.ModelForm):
    full_name = forms.CharField(max_length=20)
    class Meta:
        model = TestModel
        exclude = '__all__'

f = TestForm()
assert 'name' in f.fields
assert 'full_name' in f.fields
assert 'all_' not in f.fields
}}}

The field `all_` has been excluded on the grounds that `'all_' in '__all__'` is `True`, which is probably not the intended behaviour. I would be glad to help if this issue is confirmed.
Best,
Quentin"	New feature	closed	Forms	dev	Normal	wontfix			Unreviewed	0	0	0	0	0	0
