Ejemplo n.º 1
0
def liveupdate_add_props(user, wrapped):
    account_ids = set(w.author_id for w in wrapped)
    accounts = Account._byID(account_ids, data=True)

    for item in wrapped:
        item.author = LiveUpdateAccount(accounts[item.author_id])

        item.date_str = pretty_time(item._date)
Ejemplo n.º 2
0
def liveupdate_add_props(user, wrapped):
    account_ids = set(w.author_id for w in wrapped)
    accounts = Account._byID(account_ids, data=True)

    for item in wrapped:
        item.author = LiveUpdateAccount(accounts[item.author_id])

        item.date_str = pretty_time(item._date)
Ejemplo n.º 3
0
    def __init__(self, builder):
        self.current_time = datetime.datetime.now(g.tz)
        self.current_time_str = pretty_time(self.current_time)

        Listing.__init__(self, builder)
Ejemplo n.º 4
0
 def __init__(self, date):
     self.date = date.replace(minute=0, second=0, microsecond=0)
     self.date_str = pretty_time(self.date)
     Templated.__init__(self)