def getVars(self): vars = WTemplated.getVars( self ) vars['user'] = self._avatar vars['currentUser'] = self._rh._getUser() vars["tokens"] = Catalog.getIdx('user_oauth_access_token').get(self._avatar.getId(), []) vars["formatTimestamp"] = lambda ts: format_datetime(utctimestamp2date(ts), format='d/M/yyyy H:mm') return vars
def getVars(self): vars = WTemplated.getVars(self) ath = AccessTokenHolder() vars["formatTimestamp"] = lambda ts: format_datetime(utctimestamp2date(ts), format='d/M/yyyy H:mm') vars['tokens'] = sorted(ath.getList(), key=lambda t: t.getUser().getId()) return vars