Ticket #7794: validation.patch

File validation.patch, 1.0 KB (added by paltman, 16 years ago)
  • contrib/admin/validation.py

     
    11
    22from django.core.exceptions import ImproperlyConfigured
    33from django.db import models
    4 from django.newforms.models import BaseModelForm, BaseInlineFormset
     4from django.newforms.models import BaseModelForm, BaseModelFormSet
    55from django.contrib.admin.options import flatten_fieldsets, BaseModelAdmin
    66from django.contrib.admin.options import HORIZONTAL, VERTICAL
    77
     
    129129                    % (cls.__name__, attr))
    130130
    131131    # formset
    132     if hasattr(cls, 'formset') and not issubclass(cls.formset, BaseInlineFormset):
     132    if hasattr(cls, 'formset') and not issubclass(cls.formset, BaseModelFormSet):
    133133        raise ImproperlyConfigured("`%s.formset` does not inherit from "
    134                 "BaseInlineFormset." % cls.__name__)
     134                "BaseModelFormSet." % cls.__name__)
    135135
    136136def _validate_base(cls, model):
    137137    opts = model._meta
Back to Top