You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 line
388 B

  1. from flask_sqlalchemy import SQLAlchemy
  2. from flask_marshmallow import Marshmallow
  3. from marshmallow import fields
  4. from Config.DB.Models import Users
  5. ma = Marshmallow()
  6. class UsersSchema(ma.SQLAlchemyAutoSchema):
  7. admin = fields.Nested('self', attribute='Admin', many=False, default=None)
  8. class Meta:
  9. model = Users
  10. exclude = ['password', 'notification_token']