fsdfs
This commit is contained in:
parent
8c9ce1463b
commit
5666efcbec
2 changed files with 7 additions and 0 deletions
|
@ -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)
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue