def validate_fields_spec(cls, model, opts, flds, label):
 for fields in flds:
  if (type(fields) != tuple):
   fields = (fields,)
  for field in fields:
   if (field in cls.readonly_fields):
    continue
   check_formfield(cls, model, opts, label, field)
   try:
    f = opts.get_field(field)
   except models.FieldDoesNotExist:
    continue
   if (isinstance(f, models.ManyToManyField) and (not f.rel.through._meta.auto_created)):
    raise ImproperlyConfigured(("'%s.%s' can't include the ManyToManyField field '%s' because '%s' manually specifies a 'through' model." % (cls.__name__, label, field, field)))

def validate_fields_spec ( cls , model , opts , flds , label ) : for fields in flds : if ( type ( fields ) != tuple ) : fields = ( fields , ) for field in fields : if ( field in cls . readonly_fields ) : continue check_formfield ( cls , model , opts , label , field ) try : f = opts . get_field ( field ) except models . FieldDoesNotExist : continue if ( isinstance ( f , models . ManyToManyField ) and ( not f . rel . through . _meta . auto_created ) ) : raise ImproperlyConfigured ( ( "'%s.%s' can't include the ManyToManyField field '%s' because '%s' manually specifies a 'through' model." % ( cls . __name__ , label , field , field ) ) )
validate the fields specification in flds from a modeladmin subclass cls for the model model .