From dda8537b531c3705f1de3dbee2143b99bfdcfe97 Mon Sep 17 00:00:00 2001 From: codl Date: Sat, 2 Sep 2017 10:44:21 +0200 Subject: [PATCH] model: __str__ not __repr__ --- model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model.py b/model.py index c66c749..eb8c336 100644 --- a/model.py +++ b/model.py @@ -146,7 +146,7 @@ class Account(TimestampMixin, RemoteIDMixin): # backref: posts # backref: sessions - def __repr__(self): + def __str__(self): return f"" def post_count(self): @@ -238,7 +238,7 @@ class Post(db.Model, TimestampMixin, RemoteIDMixin): has_media = db.Column(db.Boolean, server_default='FALSE', nullable=False) direct = db.Column(db.Boolean, server_default='FALSE', nullable=False) - def __repr__(self): + def __str__(self): return ''.format(self.id, self.author_id)