diff options
author | Aurélien Bompard <aurelien@bompard.org> | 2012-09-06 11:08:10 +0200 |
---|---|---|
committer | Aurélien Bompard <aurelien@bompard.org> | 2012-09-06 11:08:10 +0200 |
commit | 9877360a7f81943239d852de14eebf8be7674ad5 (patch) | |
tree | 835d3adec2ec9eba46233f5d7724aea9af4ceece /hyperkitty/views/thread.py | |
parent | 54f6eb7982a562a3526ee3b9be62fa6e9344dbdb (diff) | |
download | hyperkitty-9877360a7f81943239d852de14eebf8be7674ad5.tar.gz hyperkitty-9877360a7f81943239d852de14eebf8be7674ad5.tar.xz hyperkitty-9877360a7f81943239d852de14eebf8be7674ad5.zip |
Move the store pool to HyperKitty
Diffstat (limited to 'hyperkitty/views/thread.py')
-rw-r--r-- | hyperkitty/views/thread.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/hyperkitty/views/thread.py b/hyperkitty/views/thread.py index f8820c9..fd0d466 100644 --- a/hyperkitty/views/thread.py +++ b/hyperkitty/views/thread.py @@ -7,13 +7,14 @@ from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger, Invali from django.contrib.auth.decorators import (login_required, permission_required, user_passes_test) +from kittystore import get_store from hyperkitty.models import Rating, Tag #from hyperkitty.lib.mockup import * from forms import * from hyperkitty.utils import log +from hyperkitty.lib import get_months -from hyperkitty.lib import ThreadSafeStorePool, get_months def thread_index (request, mlist_fqdn, threadid): @@ -22,8 +23,8 @@ def thread_index (request, mlist_fqdn, threadid): search_form = SearchForm(auto_id=False) t = loader.get_template('thread.html') - STORE = ThreadSafeStorePool().get() - threads = STORE.get_messages_in_thread(mlist_fqdn, threadid) + store = get_store(settings.KITTYSTORE_URL) + threads = store.get_messages_in_thread(mlist_fqdn, threadid) #prev_thread = mongo.get_thread_name(list_name, int(threadid) - 1) prev_thread = [] if len(prev_thread) > 30: @@ -65,7 +66,7 @@ def thread_index (request, mlist_fqdn, threadid): participants[message.sender_name] = {'email': message.sender_email} cnt = cnt + 1 - archives_length = get_months(STORE, mlist_fqdn) + archives_length = get_months(store, mlist_fqdn) from_url = '/thread/%s/%s/' % (mlist_fqdn, threadid) tag_form = AddTagForm(initial={'from_url' : from_url}) |