This commit is contained in:
1
src/schemas/__init__.py
Normal file
1
src/schemas/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from .userschema import UserSchema
|
||||
24
src/schemas/userschema.py
Normal file
24
src/schemas/userschema.py
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env python3
|
||||
from flaskaddons.marshm import ma
|
||||
from marshmallow import fields
|
||||
|
||||
|
||||
"""
|
||||
User Masrshmallow schema
|
||||
"""
|
||||
|
||||
__author__ = "@tormakris"
|
||||
__copyright__ = "Copyright 2020, onSpot Team"
|
||||
__module_name__ = "userschema"
|
||||
__version__text__ = "1"
|
||||
|
||||
|
||||
class UserSchema(ma.Schema):
|
||||
"""
|
||||
Parameters:
|
||||
- name (string)
|
||||
- passowrd (string)
|
||||
"""
|
||||
|
||||
name = fields.String(required=True)
|
||||
password = fields.String(required=True)
|
||||
Reference in New Issue
Block a user