summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-04-30 00:58:31 +0200
committerDan McGee <dan@archlinux.org>2011-04-30 00:58:31 +0200
commit2d1cfc24232945b2ad2c749cc3b3443a89ee880f (patch)
tree9adb1977de5f5cf47c42d701b3e9171a58fe1aec
parent23cda53f812f1b907def8a9dcac95167b8c7c395 (diff)
downloadarchweb-2d1cfc24232945b2ad2c749cc3b3443a89ee880f.tar.gz
archweb-2d1cfc24232945b2ad2c749cc3b3443a89ee880f.tar.xz
Use single quotes only in dev report view
-rw-r--r--devel/views.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/devel/views.py b/devel/views.py
index 01d54e6..cf24f0d 100644
--- a/devel/views.py
+++ b/devel/views.py
@@ -128,20 +128,20 @@ def change_profile(request):
@login_required
def report(request, report):
- title = "Developer Report"
+ title = 'Developer Report'
packages = Package.objects.select_related('arch', 'repo')
names = attrs = None
- if report == "old":
- title = "Packages last built more than two years ago"
+ if report == 'old':
+ title = 'Packages last built more than two years ago'
cutoff = datetime.now() - timedelta(days=730)
packages = packages.filter(build_date__lt=cutoff).order_by('build_date')
- elif report == "big":
- title = "100 largest compressed packages"
+ elif report == 'big':
+ title = '100 largest compressed packages'
packages = packages.order_by('-compressed_size')[:100]
names = [ 'Compressed Size', 'Installed Size' ]
attrs = [ 'compressed_size', 'installed_size' ]
- elif report == "uncompressed-man":
- title = "Packages with uncompressed manpages"
+ elif report == 'uncompressed-man':
+ title = 'Packages with uncompressed manpages'
# magic going on here! Checking for all '.1'...'.9' extensions
invalid_endings = [Q(filename__endswith='.%d' % n) for n in range(1,10)]
invalid_endings.append(Q(filename__endswith='.n'))
@@ -149,8 +149,8 @@ def report(request, report):
reduce(operator.or_, invalid_endings))
).values_list('pkg_id', flat=True).distinct()
packages = packages.filter(id__in=set(bad_files))
- elif report == "uncompressed-info":
- title = "Packages with uncompressed infopages"
+ elif report == 'uncompressed-info':
+ title = 'Packages with uncompressed infopages'
bad_files = PackageFile.objects.filter(directory__contains='/info',
filename__endswith='.info').values_list(
'pkg_id', flat=True).distinct()