forked from rDrama/rDrama
fsdfs
parent
bc55dda81b
commit
b5db325d22
|
@ -47,6 +47,7 @@ class OauthApp(Base):
|
||||||
|
|
||||||
return [x[0] for x in posts.all()]
|
return [x[0] for x in posts.all()]
|
||||||
|
|
||||||
|
|
||||||
def comments_idlist(self, page=1, **kwargs):
|
def comments_idlist(self, page=1, **kwargs):
|
||||||
|
|
||||||
posts = g.db.query(Comment.id).options(lazyload('*')).options(lazyload('*')).filter_by(app_id=self.id)
|
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):
|
def created_datetime(self):
|
||||||
return str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(self.created_utc)))
|
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
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def age_string(self):
|
def age_string(self):
|
||||||
|
|
Loading…
Reference in New Issue