diff options
author | Aurélien Bompard <aurelien@bompard.org> | 2012-08-30 18:23:45 +0200 |
---|---|---|
committer | Aurélien Bompard <aurelien@bompard.org> | 2012-08-30 18:23:45 +0200 |
commit | 0637b6b97fec94799c3733e8b20519456814fce8 (patch) | |
tree | 026d15d66afec93ab5046bea50faab6c5b5d90b1 /hyperkitty/views/list.py | |
parent | ec7da1aac20a01838d30e02d550c13b22414be73 (diff) | |
download | hyperkitty-0637b6b97fec94799c3733e8b20519456814fce8.tar.gz hyperkitty-0637b6b97fec94799c3733e8b20519456814fce8.tar.xz hyperkitty-0637b6b97fec94799c3733e8b20519456814fce8.zip |
Normalize tabs to spaces
Diffstat (limited to 'hyperkitty/views/list.py')
-rw-r--r-- | hyperkitty/views/list.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/hyperkitty/views/list.py b/hyperkitty/views/list.py index d122c84..e4a69bd 100644 --- a/hyperkitty/views/list.py +++ b/hyperkitty/views/list.py @@ -34,7 +34,7 @@ def archives(request, mlist_fqdn, year=None, month=None, day=None): # No year/month: past 32 days # year and month: find the 32 days for that month # @TODO : modify url.py to account for page number - + end_date = None if year or month or day: try: @@ -89,7 +89,7 @@ def archives(request, mlist_fqdn, year=None, month=None, day=None): totallikes = 0 totaldislikes = 0 messages = STORE.get_thread(mlist_fqdn, thread.thread_id) - + for message in messages: # Extract all the votes for this message try: @@ -107,27 +107,27 @@ def archives(request, mlist_fqdn, year=None, month=None, day=None): dislikes = dislikes + 1 else: pass - + totallikes = totallikes + likes totalvotes = totalvotes + likes + dislikes totaldislikes = totaldislikes + dislikes - + try: thread.avglike = totallikes / totalvotes except: thread.avglike = 0 - - try: + + try: thread.avgdislike = totaldislikes / totalvotes except: thread.avgdislike = 0 - + threads[cnt] = thread - cnt = cnt + 1 + cnt = cnt + 1 paginator = Paginator(threads, 10) pageNo = request.GET.get('page') - + try: threads = paginator.page(pageNo) except PageNotAnInteger: @@ -139,7 +139,7 @@ def archives(request, mlist_fqdn, year=None, month=None, day=None): archives_length = STORE.get_archives_length(mlist_fqdn) - + c = RequestContext(request, { 'list_name' : list_name, 'objects': threads.object_list, |