summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Yves Chibon <pingou@pingoured.fr>2012-03-18 11:05:48 +0100
committerPierre-Yves Chibon <pingou@pingoured.fr>2012-03-18 11:05:48 +0100
commitd79067cb0cf19cc6a1a0b2d62eb2166779a805f1 (patch)
tree3cdb0b89b0cfd20a91f197a8da71c2f5921af4a7
parent4f6fa8a3bdb09a56e8ec882a07d74a31170a3cf0 (diff)
downloadhyperkitty-d79067cb0cf19cc6a1a0b2d62eb2166779a805f1.tar.gz
hyperkitty-d79067cb0cf19cc6a1a0b2d62eb2166779a805f1.tar.xz
hyperkitty-d79067cb0cf19cc6a1a0b2d62eb2166779a805f1.zip
Add packaging and fr-users list -- Fix the end_date when the month is December
-rw-r--r--views/pages.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/views/pages.py b/views/pages.py
index fcd1ce3..c8a4e01 100644
--- a/views/pages.py
+++ b/views/pages.py
@@ -39,7 +39,7 @@ def index(request):
'username': settings.MAILMAN_USER, 'password': settings.MAILMAN_PASS}
#data = json.load(urlgrabber.urlopen(urljoin(base_url, 'lists')))
#list_data = sorted(data['entries'], key=lambda elem: (elem['mail_host'], elem['list_name']))
- list_data = ['devel@fp.o', 'packaging@fp.o']
+ list_data = ['devel@fp.o', 'packaging@fp.o', 'fr-users@fp.o']
c = RequestContext(request, {
'app_name': settings.APP_NAME,
'lists': list_data,
@@ -54,7 +54,10 @@ def archives(request, mlist_fqdn, year=None, month=None):
if year or month:
try:
begin_date = datetime(int(year), int(month), 1)
- end_date = datetime(int(year), int(month) +1, 1)
+ if int(month) == 12:
+ end_date = datetime(int(year) + 1, 1, 1)
+ else:
+ end_date = datetime(int(year), int(month) +1, 1)
month_string = begin_date.strftime('%B %Y')
except ValueError, err:
logger.error('Wrong format given for the date')
@@ -64,13 +67,10 @@ def archives(request, mlist_fqdn, year=None, month=None):
begin_date = datetime(today.year, today.month, 1)
end_date = datetime(today.year, today.month+1, 1)
month_string = 'Past thirty days'
-
list_name = mlist_fqdn.split('@')[0]
search_form = SearchForm(auto_id=False)
t = loader.get_template('month_view2.html')
-
- print begin_date, end_date
threads = mongo.get_archives(list_name, start=begin_date,
end=end_date)