Anton Shestakov <av6@dwimlabs.net>, Wed, 27 Jul 2016 18:43:12 +0800
viewer: using tuples for describing handlers is easier
(Especially true since Tornado 3.2)
candolint/uimodules.py
Permissions: -rw-r--r--
from tornado.web import UIModule def render(self, value, format_=True): datetime = value.isoformat() + 'Z' text = value.strftime('%Y-%m-%d %H:%M:%S') + ' UTC' parts = value.split(' ', 2) datetime = '{}T{}{}'.format(*parts) return self.render_string('ui/time.html', datetime=datetime, text=text) return self.render_string('ui/badges.html', check=check)