Commit f1bc3ecc authored by Michal Čihař's avatar Michal Čihař

Simplify code

parent de6b0ca0
...@@ -330,8 +330,10 @@ def not_found(request): ...@@ -330,8 +330,10 @@ def not_found(request):
def about(request): def about(request):
'''
Shows about page with version information.
'''
context = {} context = {}
versions = get_versions()
totals = Profile.objects.aggregate(Sum('translated'), Sum('suggested')) totals = Profile.objects.aggregate(Sum('translated'), Sum('suggested'))
total_strings = 0 total_strings = 0
for project in SubProject.objects.iterator(): for project in SubProject.objects.iterator():
...@@ -349,7 +351,7 @@ def about(request): ...@@ -349,7 +351,7 @@ def about(request):
).distinct().count() ).distinct().count()
context['total_checks'] = Check.objects.count() context['total_checks'] = Check.objects.count()
context['ignored_checks'] = Check.objects.filter(ignore=True).count() context['ignored_checks'] = Check.objects.filter(ignore=True).count()
context['versions'] = versions context['versions'] = get_versions()
return render_to_response('about.html', RequestContext(request, context)) return render_to_response('about.html', RequestContext(request, context))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment