You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classUserIn(Schema):
"""Fields for user when requesting a new account in admin."""username=fields.Str(
required=True, validate=validate.Length(min=4, max=254)
)
password=fields.Str(
required=True, validate=validate.Length(min=8, max=16)
)
I also have a dataclasses_json equivalant:
@dataclass_json@dataclassclassInUser:
"""New user account dataclass."""username: strpassword: str
I want to re-use the UserIn for loading InUser. but it appears InUser.schema() does not take the already defined one?
Am I missing some subtle aspect for this?
Possible solution
No response
Alternatives
To cache the whole thing
_in_user_setup = InUser.schema(UserIn)
And deserializing from dictionary (or json)
new_user:InUser = _in_user_setup.load({...})
Context
No response
The text was updated successfully, but these errors were encountered:
Description
I already have (flask) Schema classes defined:
I also have a dataclasses_json equivalant:
I want to re-use the
UserIn
for loadingInUser
. but it appearsInUser.schema()
does not take the already defined one?Am I missing some subtle aspect for this?
Possible solution
No response
Alternatives
To cache the whole thing
_in_user_setup = InUser.schema(UserIn)
And deserializing from dictionary (or json)
new_user:InUser = _in_user_setup.load({...})
Context
No response
The text was updated successfully, but these errors were encountered: