diff options
author | Dan McGee <dan@archlinux.org> | 2010-12-04 02:38:50 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-12-04 02:39:56 +0100 |
commit | 1b826f3e12b66d9e2d3a90b1dddf5170ab48dc12 (patch) | |
tree | 9efb567d58ab480c165faa18e6291bcb3e6250ec /packages | |
parent | f2147cdeec3daafbdbbf3172fd4cc94ef24ee851 (diff) | |
download | archweb-1b826f3e12b66d9e2d3a90b1dddf5170ab48dc12.tar.gz archweb-1b826f3e12b66d9e2d3a90b1dddf5170ab48dc12.tar.xz |
Display flag date in package search and allow sorting
This exposes something we added a while back, and has been shown elsewhere,
but will now be available for everyone to see. Also change the default
search order to just be by pkgname; we don't need to do a multi-column
search by default.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages')
-rw-r--r-- | packages/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/views.py b/packages/views.py index 40e8a08..283f9ce 100644 --- a/packages/views.py +++ b/packages/views.py @@ -199,7 +199,7 @@ def search(request, page=None): if packages.count() == 1: return redirect(packages[0]) - allowed_sort = ["arch", "repo", "pkgname", "last_update"] + allowed_sort = ["arch", "repo", "pkgname", "last_update", "flag_date"] allowed_sort += ["-" + s for s in allowed_sort] sort = request.GET.get('sort', None) # TODO: sorting by multiple fields makes using a DB index much harder @@ -208,7 +208,7 @@ def search(request, page=None): request.GET['sort'], 'repo', 'arch', 'pkgname') page_dict['sort'] = sort else: - packages = packages.order_by('repo', 'arch', '-last_update', 'pkgname') + packages = packages.order_by('pkgname') return list_detail.object_list(request, packages, template_name="packages/search.html", |