--- a/sites/irclogs.qmsk.net/handlers.py Sun Feb 08 03:13:11 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-"""
- Our URL action handlers
-"""
-
-from lib import http, template
-
-import urls, channels
-
-# load templates from here
-templates = template.TemplateLoader("sites/irclogs.qmsk.net/templates",
- urls = urls,
- channel_list = channels.channel_list,
-)
-
-def index (request) :
- """
- The topmost index page, display a list of available channels, perhaps some general stats
- """
-
- return templates.render_to_response("index",
- req = request,
- )
-
-def channel_select (request, channel) :
- """
- Redirect to the appropriate channel_view
- """
-
- return http.Redirect(urls.channel_view.build(request, channel=channel.id))
-
-def channel_view (request, channel, count) :
- """
- The main channel view page, display the most important info, and all requisite links
- """
-
- if count == 'all' :
- xxx
-
- else :
- count = int(count)
-
- return templates.render_to_response("channel",
- req = request,
- channel = channel,
- count = count,
- lines = channel.source.get_latest(count),
- )
-
- pass
-
-def channel_last (request, channel, count, format) :
- """
- Display the last x lines of channel messages in various formats
- """
-
- if format == 'txt' :
- return http.Response('\n'.join(channel.source.get_latest(count)), 'text/plain')
-
- else :
- raise http.ResponseError("Unknown filetype %r" % format)
-
-def channel_search (request, channel) :
- """
- Display the search form for the channel for GET, or do the search for POST
- """
-
- pass
-