summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-07-06 13:17:29 -0500
committerDan McGee <dan@archlinux.org>2011-07-06 13:17:29 -0500
commit86c48cc4314b593ee6c9136490a72433a5dca1e2 (patch)
tree69f3dd27f4375c9a09ffd73104fe9b37428db908
parentd8e089fd30ac2dacac54c444cc522ee44ee332ed (diff)
Add a few more valid package sort fields
Just for fun and for people that know what they are doing. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--packages/views.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/views.py b/packages/views.py
index 3d9032e6..1f2a38d3 100644
--- a/packages/views.py
+++ b/packages/views.py
@@ -279,7 +279,9 @@ def search(request, page=None):
'search_form': form,
'current_query': current_query
}
- allowed_sort = ["arch", "repo", "pkgname", "last_update", "flag_date"]
+ allowed_sort = ["arch", "repo", "pkgname", "pkgname",
+ "compressed_size", "installed_size",
+ "build_date", "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