38:4326af080387
Anton Shestakov <av6@dwimlabs.net>, Sat, 18 Jun 2016 22:30:42 +0800
viewer: get_or_404() to raise 404 (instead of 500) when model doesn't exist

next change 75:a784221a989b
previous change 24:16c6f6907c16

candolint/uimodules.py

Permissions: -rw-r--r--

Other formats: Feeds:
from tornado.web import UIModule
class Time(UIModule):
def render(self, value):
datetime = value.isoformat() + 'Z'
text = value.strftime('%Y-%m-%d %H:%M:%S') + ' UTC'
return self.render_string('ui/time.html', datetime=datetime, title=text, text=text)
class Badges(UIModule):
def render(self, check):
return self.render_string('ui/badges.html', check=check)