--- a/handlers.py Tue Feb 10 00:19:56 2009 +0200
+++ b/handlers.py Tue Feb 10 01:02:26 2009 +0200
@@ -140,17 +140,22 @@
days = days,
)
-@preferences.handler(prefs.formatter, prefs.timezone)
-def channel_date (request, channel, date, formatter, timezone) :
+@preferences.handler(prefs.formatter, prefs.timezone, prefs.count)
+def channel_date (request, channel, date, formatter, timezone, count, page=None) :
"""
Display all log data for the given date
"""
-
+
# fix date timezone
date = date.replace(tzinfo=timezone)
# get latest events
- lines = channel.source.get_date(date)
+ if page :
+ page, max, lines = channel.source.get_date_paged(date, count, page)
+
+ else :
+ lines = channel.source.get_date(date)
+ max = None
# lines
lines = formatter.format_html(lines)
@@ -161,6 +166,9 @@
prefs = request.prefs,
channel = channel,
date = date,
+ page = page,
+ count = count,
+ max = max,
lines = lines,
)
@@ -171,7 +179,7 @@
"""
# calculate skip offset from page/count
- skip = page * count
+ skip = (page - 1) * count
# got a search query?
if q :