Пример #1
0
    def __init__(cls, name, bases, attribs):

        if name == 'EntityValidatorMixin':
            # EntityValidatorMixin
            return

        EntityMeta.__init__(cls, name, bases, attribs)

        fields = cls._descriptor.fields
        for fieldname, field in fields.items():
            validator, stage = get_validator_for_field(field)
            collect_validator(cls, fieldname, validator, stage, auto=True)
            # XXX : 'validate_with=SomeValidator()' kwarg ?

        # http://www.sqlalchemy.org/trac/ticket/551
        # needs to pass the func name in until the patch
        # is officially applied
        cls.save = with_validation(cls.save, 'save')
        cls.update = with_validation(cls.update, 'update')
Пример #2
0
 def __init__( self, classname, bases, dictionary ):
     EntityMeta.__init__( self, type_name,
                          bases, dictionary )
Пример #3
0
 def __new__( cls, classname, bases, dictionary ):
     return EntityMeta.__new__( cls, type_name,
                                bases, dictionary )
Пример #4
0
 def __init__( self, classname, bases, dictionary ):
     EntityMeta.__init__( self, t3_status_name,
                          bases, dictionary )
Пример #5
0
 def __init__(self, classname, bases, dictionary):
     EntityMeta.__init__(self, type_name, bases, dictionary)
Пример #6
0
 def __new__(cls, classname, bases, dictionary):
     return EntityMeta.__new__(cls, type_name, bases, dictionary)
Пример #7
0
 def __init__(self, classname, bases, dictionary):
     EntityMeta.__init__(self, t3_status_name, bases, dictionary)