Ticket #7794: validation.patch
File validation.patch, 1.0 KB (added by , 16 years ago) |
---|
-
contrib/admin/validation.py
1 1 2 2 from django.core.exceptions import ImproperlyConfigured 3 3 from django.db import models 4 from django.newforms.models import BaseModelForm, Base InlineFormset4 from django.newforms.models import BaseModelForm, BaseModelFormSet 5 5 from django.contrib.admin.options import flatten_fieldsets, BaseModelAdmin 6 6 from django.contrib.admin.options import HORIZONTAL, VERTICAL 7 7 … … 129 129 % (cls.__name__, attr)) 130 130 131 131 # formset 132 if hasattr(cls, 'formset') and not issubclass(cls.formset, Base InlineFormset):132 if hasattr(cls, 'formset') and not issubclass(cls.formset, BaseModelFormSet): 133 133 raise ImproperlyConfigured("`%s.formset` does not inherit from " 134 "Base InlineFormset." % cls.__name__)134 "BaseModelFormSet." % cls.__name__) 135 135 136 136 def _validate_base(cls, model): 137 137 opts = model._meta