This commit is contained in:
parent
00b87b040e
commit
c554194fb5
7 changed files with 10 additions and 18 deletions
|
@ -1,7 +1,6 @@
|
|||
from marshmallow import SchemaOpts
|
||||
from marshmallow import pre_load, post_dump
|
||||
from marshmallow_sqlalchemy import ModelSchemaOpts, ModelConverter, ModelSchema
|
||||
from .. import ma
|
||||
from .. import db
|
||||
|
||||
|
||||
|
@ -23,7 +22,6 @@ class NamespaceOpts(ModelSchemaOpts):
|
|||
self.include_relationships = True
|
||||
|
||||
|
||||
#class NamespacedSchema(ma.SQLAlchemySchema):
|
||||
class NamespacedSchema(ModelSchema):
|
||||
OPTIONS_CLASS = NamespaceOpts
|
||||
|
||||
|
@ -42,4 +40,3 @@ class NamespacedSchema(ModelSchema):
|
|||
else:
|
||||
key = self.opts.plural_name if many else self.opts.name
|
||||
return {key: data}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue