Skip to content

Instantly share code, notes, and snippets.

@Porter97
Created March 30, 2020 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Porter97/2e40a469673e53e27cb0e43037b2c3c7 to your computer and use it in GitHub Desktop.
Save Porter97/2e40a469673e53e27cb0e43037b2c3c7 to your computer and use it in GitHub Desktop.
#...
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