def __init__(self, meta, **kwargs):
     SchemaOpts.__init__(self, meta, **kwargs)
     self.attrs_schema = getattr(meta, 'attrs_schema', None)
     if self.attrs_schema and not issubclass(self.attrs_schema,
                                             ObjectAttrs):
         raise Exception("{} must be a subclass of ObjectAttrs".format(
             self.attrs_schema))
Exemplo n.º 2
0
 def __init__(self, meta, **kwargs):
     SchemaOpts.__init__(self, meta, **kwargs)
     self.name = getattr(meta, "name", None)
     self.plural_name = getattr(meta, "plural_name", self.name)
     self.model = getattr(meta, "model", None)
     self.model_converter = getattr(meta, "model_converter", ModelConverter)
     self.include_fk = getattr(meta, "include_fk", False)
     self.transient = getattr(meta, "transient", False)
     self.sqla_session = db.session
     self.load_instance = True
     self.include_relationships = True
    def __init__(self, meta, **kwargs):
        SchemaOpts.__init__(self, meta, **kwargs)
        self.attrs_schema = getattr(meta, 'attrs_schema', None)
        self.attrs_schema_many = getattr(meta, 'attrs_schema_many', False)
        self.attrs_schema_required = getattr(meta, 'attrs_schema_required',
                                             False)

        if self.attrs_schema and not issubclass(self.attrs_schema,
                                                ObjectAttrs):
            raise Exception("{} must be a subclass of ObjectAttrs".format(
                self.attrs_schema))

        self.object_schema = getattr(meta, 'object_schema', Object)

        if self.object_schema and not issubclass(self.object_schema, Object):
            raise Exception("{} must be a subclass of Object".format(
                self.object_schema))
Exemplo n.º 4
0
 def __init__(self, meta, **kwargs):
     SchemaOpts.__init__(self, meta, **kwargs)
     self.templates = getattr(meta, 'templates', None)
     self.path = getattr(meta, 'path', '')
     self.default_dirs = getattr(meta, 'default_dirs', [])
Exemplo n.º 5
0
 def __init__(self, meta, **kwargs):
     SchemaOpts.__init__(self, meta, **kwargs)
     self.service = getattr(meta, 'service', 'dataselect')
Exemplo n.º 6
0
 def __init__(self, meta):
     _SchemaOpts.__init__(self, meta)
     self.wrap = getattr(meta, 'wrap', False)
     self.strict = True
     self.related = getattr(meta, 'related', None)
     self.meta = getattr(meta, 'meta', None)
Exemplo n.º 7
0
 def __init__(self, meta):
     SchemaOpts.__init__(self, meta)
     self.decoding_class = getattr(meta, 'decoding_class', None)
Exemplo n.º 8
0
 def __init__(self, meta, **kwargs):
     SchemaOpts.__init__(self, meta, **kwargs)
     self.name = getattr(meta, 'name', None)
     self.plural_name = getattr(meta, 'plural_name', self.name)
Exemplo n.º 9
0
 def __init__(self, meta, ordered):
     SchemaOpts.__init__(self, meta, ordered=ordered)
     self.decoding_class = getattr(meta, "decoding_class", None)
Exemplo n.º 10
0
 def __init__(self, meta, **kwargs):
     SchemaOpts.__init__(self, meta, **kwargs)
     self.service = getattr(meta, "service", "dataselect")
Exemplo n.º 11
0
 def __init__(self, meta, **kwargs):
     SchemaOpts.__init__(self, meta, **kwargs)
     self.model = getattr(meta, "model", None)
     self.partial_fields = []
Exemplo n.º 12
0
 def __init__(self, meta):
     SchemaOpts.__init__(self, meta)
Exemplo n.º 13
0
 def __init__(self, meta, **kwargs):
     SchemaOpts.__init__(self, meta, **kwargs)
     self.model = getattr(meta, 'model', None)
     self.model_args = getattr(meta, 'model_args', [])
     self.model_kwargs = getattr(meta, 'model_kwargs', {})
Exemplo n.º 14
0
 def __init__(self, meta):
     SchemaOpts.__init__(self, meta)
     self.type = getattr(meta, 'type', None)
     self.relationships = getattr(meta, 'relationships', {})
Exemplo n.º 15
0
 def __init__(self, meta, **kwargs):
     del kwargs
     SchemaOpts.__init__(self, meta)
     for attr_name in ['model', 'unique']:
         value = getattr(meta, attr_name, None)
         setattr(self, attr_name, value)
Exemplo n.º 16
0
 def __init__(self, meta, **kwargs):
     SchemaOpts.__init__(self, meta, **kwargs)
     self.ui_schema = getattr(meta, "ui_schema", {})
Exemplo n.º 17
0
 def __init__(self, meta, **kwargs):
     SchemaOpts.__init__(self, meta, **kwargs)
     self.model = getattr(meta, "model", None)
Exemplo n.º 18
0
 def __init__(self, meta, **kwargs):
     SchemaOpts.__init__(self, meta, **kwargs)
     self.object_type = getattr(meta, 'object_type', None) or 'undefined'
Exemplo n.º 19
0
 def __init__(self, meta):
     SchemaOpts.__init__(self, meta)
     self.model = getattr(meta, 'model', None)
Exemplo n.º 20
0
 def __init__(self, meta):
     SchemaOpts.__init__(self, meta)
     self.decoding_class = getattr(meta, 'decoding_class', None)
Exemplo n.º 21
0
 def __init__(self, meta):
     SchemaOpts.__init__(self, meta)
     self.strict = True