From 28b23b10c5193770e7b5f53ff82576d76b003c3a Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Tue, 15 May 2012 19:41:44 +0200 Subject: Adjust to new data structure --- views/pages.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'views/pages.py') diff --git a/views/pages.py b/views/pages.py index 47e642c..9ea0396 100644 --- a/views/pages.py +++ b/views/pages.py @@ -225,7 +225,7 @@ def message (request, mlist_fqdn, messageid): search_form = SearchForm(auto_id=False) t = loader.get_template('message.html') - message = Bunch(STORE.get_email(list_name, messageid)) + message = STORE.get_email(list_name, messageid) message.email = message.email.strip() c = RequestContext(request, { @@ -334,7 +334,7 @@ def thread (request, mlist_fqdn, threadid): search_form = SearchForm(auto_id=False) t = loader.get_template('thread.html') - threads = STORE.get_thread_list(list_name, threadid) + threads = STORE.get_thread(list_name, threadid) #prev_thread = mongo.get_thread_name(list_name, int(threadid) - 1) prev_thread = [] if len(prev_thread) > 30: @@ -347,10 +347,9 @@ def thread (request, mlist_fqdn, threadid): participants = {} cnt = 0 for msg in threads: - msg = Bunch(msg) - msg.email.email = msg.email.email.strip() + msg.email = msg.email.strip() # Statistics on how many participants and threads this month - participants[msg.email.From] = Bunch({'Email': msg.email.email}) + participants[msg.sender] = {'email': msg.email} cnt = cnt + 1 archives_length = STORE.get_archives_length(list_name) -- cgit