remotes/1693045480750635534/spooky-22
Aevann1 2021-09-19 20:31:31 +02:00
parent bc55dda81b
commit b5db325d22
2 changed files with 7 additions and 0 deletions

View File

@ -47,6 +47,7 @@ class OauthApp(Base):
return [x[0] for x in posts.all()]
def comments_idlist(self, page=1, **kwargs):
posts = g.db.query(Comment.id).options(lazyload('*')).options(lazyload('*')).filter_by(app_id=self.id)

View File

@ -89,6 +89,12 @@ class Submission(Base):
def created_datetime(self):
return str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(self.created_utc)))
@property
@lazy
def age(self):
return int(time.time()) - self.created_utc
@property
@lazy
def age_string(self):