diff options
| author | Pierre-Yves Chibon <pingou@pingoured.fr> | 2012-04-11 22:40:21 +0200 |
|---|---|---|
| committer | Pierre-Yves Chibon <pingou@pingoured.fr> | 2012-04-11 22:40:21 +0200 |
| commit | 70d76981d2c8ec696e0f755c11b1ee05e85a658a (patch) | |
| tree | 41c591f31171feb360ac0ea67d3f247b7e20196d /views | |
| parent | 71ab4141c718ac0bf6eabc3452a1d4d310bca60e (diff) | |
| download | hyperkitty-70d76981d2c8ec696e0f755c11b1ee05e85a658a.tar.gz hyperkitty-70d76981d2c8ec696e0f755c11b1ee05e85a658a.tar.xz hyperkitty-70d76981d2c8ec696e0f755c11b1ee05e85a658a.zip | |
Make the bar of the plot clickable
Diffstat (limited to 'views')
| -rw-r--r-- | views/pages.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/views/pages.py b/views/pages.py index 82b4d46..6ed9964 100644 --- a/views/pages.py +++ b/views/pages.py @@ -156,7 +156,13 @@ def list(request, mlist_fqdn=None): cnt = 0 for msg in threads: msg = Bunch(msg) - key = '%s%s%s' % (msg.Date.year, msg.Date.month, msg.Date.day) + month = msg.Date.month + if month < 10: + month = '0%s' % month + day = msg.Date.day + if day < 10: + day = '0%s' % day + key = '%s%s%s' % (msg.Date.year, month, day) if key in dates: dates[key] = dates[key] + 1 else: @@ -187,6 +193,9 @@ def list(request, mlist_fqdn=None): # Get the list activity per day days = dates.keys() days.sort() + dates_string = ["%s/%s/%s" % (key[0:4], key[4:6], key[6:8]) for key in days] + #print days + #print dates_string evolution = [dates[key] for key in days] if not evolution: evolution.append(0) @@ -206,7 +215,8 @@ def list(request, mlist_fqdn=None): 'top_author': authors, 'threads_per_category': threads_per_category, 'archives_length': archives_length, - 'evolution' : evolution, + 'evolution': evolution, + 'dates_string': dates_string, }) return HttpResponse(t.render(c)) |
