summaryrefslogtreecommitdiff
path: root/patchtracker/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'patchtracker/views.py')
-rw-r--r--patchtracker/views.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/patchtracker/views.py b/patchtracker/views.py
index b125681..0a316eb 100644
--- a/patchtracker/views.py
+++ b/patchtracker/views.py
@@ -66,3 +66,10 @@ def download_patch(request, patchType, package, version, patchName):
elif patchType == "series":
patch = pkg.diffhandler().series().fetch(patchName)
return django.http.HttpResponse(patch, mimetype="text/plain")
+
+def frontpage(request):
+ nonlibs = [idx for idx in models.SourcePackage.objects.filter(~django.db.models.Q(name__startswith='lib')).extra(select={'index' : "SUBSTR(name, 1, 1)"}).distinct().values_list('index', flat=True)]
+ libs = [idx for idx in models.SourcePackage.objects.filter(name__startswith='lib').extra(select={'index' : "SUBSTR(name, 1, 4)"}).distinct().values_list('index', flat=True)]
+ indices = sorted(nonlibs + libs)
+ extra = { 'indices':indices, 'conf':Conf }
+ return django.shortcuts.render_to_response('frontpage.html', extra)