|
- from flask_sqlalchemy import SQLAlchemy
- from flask_marshmallow import Marshmallow
- from marshmallow import fields
- from Config.DB.Models import Users
-
- ma = Marshmallow()
-
- class UsersSchema(ma.SQLAlchemyAutoSchema):
- admin = fields.Nested('self', attribute='Admin', many=False, default=None)
-
- class Meta:
- model = Users
- exclude = ['password', 'notification_token']
|