Kaydet (Commit) 5974cbe3 authored tarafından Simon Charette's avatar Simon Charette

Removed unnecessary type creation in modelforset_factory.

üst eaecada7
...@@ -842,8 +842,6 @@ def modelformset_factory(model, form=ModelForm, formfield_callback=None, ...@@ -842,8 +842,6 @@ def modelformset_factory(model, form=ModelForm, formfield_callback=None,
Returns a FormSet class for the given Django model class. Returns a FormSet class for the given Django model class.
""" """
meta = getattr(form, 'Meta', None) meta = getattr(form, 'Meta', None)
if meta is None:
meta = type(str('Meta'), (object,), {})
if (getattr(meta, 'fields', fields) is None and if (getattr(meta, 'fields', fields) is None and
getattr(meta, 'exclude', exclude) is None): getattr(meta, 'exclude', exclude) is None):
raise ImproperlyConfigured( raise ImproperlyConfigured(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment