Last active
January 18, 2016 21:07
-
-
Save inklesspen/1854dc831c138d6496a6 to your computer and use it in GitHub Desktop.
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
# https://github.com/inklesspen/mimir/blob/fee47910e149094a339a26297324d61568dbadf3/mimir/models/mallows.py | |
class Writeup(Schema): | |
id = fields.Integer() | |
author_slug = fields.String() | |
writeup_slug = fields.String() | |
title = fields.String() | |
status = fields.String() | |
published = fields.Boolean() | |
offensive_content = fields.Boolean() | |
triggery_content = fields.Boolean() | |
posts = fields.Nested( | |
'WriteupPost', | |
only=['author', 'index', 'ordinal', 'title', 'published'], | |
many=True) | |
class WriteupPost(Schema): | |
id = fields.Integer() | |
writeup_id = fields.Integer() | |
author = fields.String() | |
index = fields.Integer() | |
ordinal = fields.String() | |
title = fields.String() | |
published = fields.Boolean() | |
writeup_title = fields.String(attribute='writeup.title') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment