﻿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
4239	child classes of Form only include base_fields attributes of parents	ctdecci@…	nobody	"Child classes of Form only include the base_fields attributes of their parent classes, not both, as it should.  Here's an example:

{{{
from django import newforms as forms
from django.db import models

class ExtendedForm(forms.Form):
    base_fields = { 'new_field': forms.CharField() }

class MyModel(models.Model):
    first_field = models.CharField(maxlength=16)
    second_field = models.CharField(maxlength=16)

obj = MyModel.objects.get(id=1)
MyForm = form_for_instance(obj, form=ExtendedForm)
f = MyForm()
}}}
However, when I render f, only new_field shows up.

It appears that the most reasonable place to fix this at the moment is in the !DeclarativeFieldsMeta.!__new!__ method.  The method is expecting the fields as class attributes, when instead, the fields are in the attrs dict with the 'base_fields' index.  I've attached a patch."		closed	Forms	dev		duplicate			Unreviewed	1	0	0	0	0	0
