Created
March 30, 2020 17:52
-
-
Save Porter97/2e40a469673e53e27cb0e43037b2c3c7 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
#... | |
class User(db.Model, UserMixin): | |
#... | |
def to_json(self): | |
json_user = { | |
"id": self.id, | |
"name": self.name, | |
"email": self.email, | |
"about_me": self.about_me, | |
"username": self.username, | |
"image": self.gravatar(), | |
"stream_token": self.stream_user_token() | |
} | |
return json_user | |
#... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment