REMOVED_FIELDS:įor field_type in field_def. required, field_type = field_type)įor key, val in enumerate( tinymodel. allowed_types = _substitute_class_refs( tinymodel, field_name = field. Field name cannot be empty!")įor index, field_type in enumerate( field. Raise ValidationError( "Field validation failed on TinyModel of class " str( type( tinymodel)) ". Raise ValidationError( "Duplicate field titles in FIELD_DEFS for TinyModel " str( tinymodel) ": " " ". If getattr( tinymodel, 'FIELD_DEFS', False):ĭuplicate_field_titles = ). Raises an Exception if any invalid fields are found. Classes defined with input strings are evaluated and replaced. VALIDATION_FAILURES))Ĭhecks that all of the type definitions fields defined in the FIELD_DEFS array are structured correctly,Īnd that they contain valid builtins and user-defined classes. Raise ValidationError( "Supported methods validation failed on TinyModel of class " str( type( tinymodel)) " \nUnsupported methods: \n" " \n". append( method " not supported by builtin type: " str( builtin)) If method not in builtin_supported_methods: SUPPORTED_METHODS:įor ( builtin, builtin_supported_methods) in tinymodel. Raises an Exception if support is missing for any method, on any builtinįor method in tinymodel. utils import ValidationErrorĭef validate_builtin_method_support( tinymodel):Ĭhecks that all of the builtins defined in SUPPORTED_BUILTINS support all of methods defined in SUPPORTED_METHODS
0 Comments
Leave a Reply. |