Commit 7b200a817f3fba4dca3f67b3cdc9c8790ff3e011

Authored by Luan
1 parent 5352dc41

Removing time restriction on home chart - closes #84

Showing 1 changed file with 0 additions and 3 deletions   Show diff stats
src/home/views.py
@@ -2,7 +2,6 @@ @@ -2,7 +2,6 @@
2 from collections import OrderedDict 2 from collections import OrderedDict
3 3
4 from django.shortcuts import render 4 from django.shortcuts import render
5 -from django.utils import timezone  
6 5
7 from search.utils import trans 6 from search.utils import trans
8 from haystack.query import SearchQuerySet 7 from haystack.query import SearchQuerySet
@@ -18,11 +17,9 @@ def index(request): @@ -18,11 +17,9 @@ def index(request):
18 hottest_threads = Thread.highest_score.from_haystack()[:6] 17 hottest_threads = Thread.highest_score.from_haystack()[:6]
19 18
20 count_types = OrderedDict() 19 count_types = OrderedDict()
21 - six_months = timezone.now() - timezone.timedelta(days=180)  
22 for type in ['thread', 'ticket', 'wiki', 'changeset', 'attachment']: 20 for type in ['thread', 'ticket', 'wiki', 'changeset', 'attachment']:
23 count_types[trans(type)] = SearchQuerySet().filter( 21 count_types[trans(type)] = SearchQuerySet().filter(
24 type=type, 22 type=type,
25 - modified__gte=six_months,  
26 ).count() 23 ).count()
27 24
28 context = { 25 context = {