浏览代码

Removed unnecessary type creation in modelforset_factory.

Simon Charette 9 年之前
父节点
当前提交
5974cbe32e
共有 1 个文件被更改,包括 0 次插入2 次删除
  1. 0 2
      django/forms/models.py

+ 0 - 2
django/forms/models.py

@@ -842,8 +842,6 @@ def modelformset_factory(model, form=ModelForm, formfield_callback=None,
     Returns a FormSet class for the given Django model class.
     """
     meta = getattr(form, 'Meta', None)
-    if meta is None:
-        meta = type(str('Meta'), (object,), {})
     if (getattr(meta, 'fields', fields) is None and
             getattr(meta, 'exclude', exclude) is None):
         raise ImproperlyConfigured(