model: __str__ not __repr__
This commit is contained in:
parent
9bc92fc1f0
commit
dda8537b53
4
model.py
4
model.py
|
@ -146,7 +146,7 @@ class Account(TimestampMixin, RemoteIDMixin):
|
||||||
# backref: posts
|
# backref: posts
|
||||||
# backref: sessions
|
# backref: sessions
|
||||||
|
|
||||||
def __repr__(self):
|
def __str__(self):
|
||||||
return f"<Account({self.id}, {self.screen_name}, {self.display_name})>"
|
return f"<Account({self.id}, {self.screen_name}, {self.display_name})>"
|
||||||
|
|
||||||
def post_count(self):
|
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)
|
has_media = db.Column(db.Boolean, server_default='FALSE', nullable=False)
|
||||||
direct = 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 '<Post ({}, Author: {})>'.format(self.id, self.author_id)
|
return '<Post ({}, Author: {})>'.format(self.id, self.author_id)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue