-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated examples with marshmallow serializers
- Loading branch information
Showing
4 changed files
with
24 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from marshmallow_sqlalchemy import ModelSchema | ||
|
||
from project.models.models import Color | ||
|
||
|
||
class ColorSchema(ModelSchema): | ||
class Meta: | ||
model = Color | ||
fields = ('id', 'name', 'timestamp') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
Flask-SQLAlchemy==2.4.1 | ||
SQLAlchemy==1.3.12 | ||
Flask-Script==2.0.6 | ||
py-ms==2.0.0 | ||
py-ms==2.0.0 | ||
marshmallow==3.3.0 | ||
marshmallow-sqlalchemy==0.21.0 |