summaryrefslogtreecommitdiffstats
path: root/hyperkitty/views/list.py
diff options
context:
space:
mode:
authorAurélien Bompard <aurelien@bompard.org>2012-09-05 14:43:39 +0200
committerAurélien Bompard <aurelien@bompard.org>2012-09-05 14:43:39 +0200
commit54f6eb7982a562a3526ee3b9be62fa6e9344dbdb (patch)
tree1bc46849e095bd5868e13ca78a6479c4c4164b29 /hyperkitty/views/list.py
parentf409640d25c33247d06a3f00c006426e593cb751 (diff)
downloadhyperkitty-54f6eb7982a562a3526ee3b9be62fa6e9344dbdb.tar.gz
hyperkitty-54f6eb7982a562a3526ee3b9be62fa6e9344dbdb.tar.xz
hyperkitty-54f6eb7982a562a3526ee3b9be62fa6e9344dbdb.zip
Adapt to KittyStore's API change
Diffstat (limited to 'hyperkitty/views/list.py')
-rw-r--r--hyperkitty/views/list.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/hyperkitty/views/list.py b/hyperkitty/views/list.py
index 21a983e..eb3ecd5 100644
--- a/hyperkitty/views/list.py
+++ b/hyperkitty/views/list.py
@@ -19,7 +19,7 @@ from django.contrib.auth.decorators import (login_required,
from hyperkitty.models import Rating, Tag
#from hyperkitty.lib.mockup import *
-from hyperkitty.lib import ThreadSafeStorePool
+from hyperkitty.lib import ThreadSafeStorePool, get_months
from forms import *
from hyperkitty.utils import log
@@ -69,7 +69,7 @@ def archives(request, mlist_fqdn, year=None, month=None, day=None):
search_form = SearchForm(auto_id=False)
t = loader.get_template('month_view.html')
STORE = ThreadSafeStorePool().get()
- threads = STORE.get_archives(mlist_fqdn, start=begin_date,
+ threads = STORE.get_threads(mlist_fqdn, start=begin_date,
end=end_date)
participants = set()
@@ -88,7 +88,7 @@ def archives(request, mlist_fqdn, year=None, month=None, day=None):
totalvotes = 0
totallikes = 0
totaldislikes = 0
- messages = STORE.get_thread(mlist_fqdn, thread.thread_id)
+ messages = STORE.get_messages_in_thread(mlist_fqdn, thread.thread_id)
for message in messages:
# Extract all the votes for this message
@@ -138,7 +138,7 @@ def archives(request, mlist_fqdn, year=None, month=None, day=None):
threads = paginator.page(paginator.num_pages)
- archives_length = STORE.get_archives_length(mlist_fqdn)
+ archives_length = get_months(STORE, mlist_fqdn)
c = RequestContext(request, {
'list_name' : list_name,
@@ -174,7 +174,7 @@ def list(request, mlist_fqdn=None):
begin_date = end_date - timedelta(days=32)
STORE = ThreadSafeStorePool().get()
- threads = STORE.get_archives(list_name=mlist_fqdn, start=begin_date,
+ threads = STORE.get_threads(list_name=mlist_fqdn, start=begin_date,
end=end_date)
participants = set()
@@ -207,7 +207,7 @@ def list(request, mlist_fqdn=None):
# active threads are the ones that have the most recent posting
active_threads = sorted(threads, key=lambda entry: entry.date, reverse=True)
- archives_length = STORE.get_archives_length(mlist_fqdn)
+ archives_length = get_months(STORE, mlist_fqdn)
# top authors are the ones that have the most kudos. How do we determine
# that? Most likes for their post?
@@ -351,7 +351,7 @@ def search_tag(request, mlist_fqdn, tag=None, page=1):
threads = []
for thread in thread_ids:
- threads_tmp = STORE.get_thread(mlist_fqdn, thread.threadid)
+ threads_tmp = STORE.get_messages_in_thread(mlist_fqdn, thread.threadid)
threads.append(threads_tmp[0])
return _search_results_page(request, mlist_fqdn, threads,