diff -r f13cf27a360b -r 07ca28f3a9f2 handlers.py --- a/handlers.py Mon Feb 09 00:24:13 2009 +0200 +++ b/handlers.py Mon Feb 09 01:11:05 2009 +0200 @@ -2,6 +2,8 @@ Our URL action handlers """ +import pytz + from qmsk.web import http, template import urls, channels, helpers @@ -37,7 +39,10 @@ # get latest events lines = channel.source.get_latest(count) - # format + # formatter + formatter = formatter(pytz.utc, '%H:%M:%S') + + # lines lines = formatter.format_html(lines) return templates.render_to_response("channel_view", @@ -61,19 +66,28 @@ else : raise http.ResponseError("Unknown filetype %r" % format) +def channel_calendar (request, channel) : + """ + Display a list of avilable logs for some days + """ + + pass + def channel_date (request, channel, date, formatter) : """ Display all log data for the given date """ # XXX: fix date timezone - import pytz date = date.replace(tzinfo=pytz.utc) # get latest events lines = channel.source.get_date(date) - # format + # formatter + formatter = formatter(pytz.utc, '%H:%M:%S') + + # lines lines = formatter.format_html(lines) return templates.render_to_response("channel_date",