diff options
author | Dusty Phillips <buchuki@gmail.com> | 2008-10-07 17:37:16 -0400 |
---|---|---|
committer | Dusty Phillips <buchuki@gmail.com> | 2008-10-07 17:37:16 -0400 |
commit | ea4f886d6c9fb359ba7a2af2b006952c3420d37e (patch) | |
tree | 9e86ef3fdfbf08075229a2e3169a6cd8fc3946cf | |
parent | 3040ed519610307aa96a2db70c7e00ea22b6aa54 (diff) |
sort returns to first page
-rw-r--r-- | packages/views.py | 3 | ||||
-rw-r--r-- | templates/packages/search.html | 10 |
2 files changed, 7 insertions, 6 deletions
diff --git a/packages/views.py b/packages/views.py index 4c7cb765..eaef72f6 100644 --- a/packages/views.py +++ b/packages/views.py @@ -135,7 +135,8 @@ def search(request, page=None): return HttpResponseRedirect(packages[0].get_absolute_url()) if 'sort' in request.GET: - packages = packages.order_by(request.GET['sort'], 'repo', 'arch', 'pkgname') + packages = packages.order_by( + request.GET['sort'], 'repo', 'arch', 'pkgname') else: packages = packages.order_by('repo', 'arch', '-last_update', 'pkgname') diff --git a/templates/packages/search.html b/templates/packages/search.html index a54a9a0f..75bc906b 100644 --- a/templates/packages/search.html +++ b/templates/packages/search.html @@ -42,13 +42,13 @@ <tr> <form method="post" action="/packages/update/"> <th> </th> - <th><a href="{% buildsortqs "arch" %}">Arch</a></th> - <th><a href="{% buildsortqs "repo" %}">Repo</a></th> - <th><a href="{% buildsortqs "pkgname" %}">Name</a></th> + <th><a href="/packages/search/{% buildsortqs "arch" %}">Arch</a></th> + <th><a href="/packages/search/{% buildsortqs "repo" %}">Repo</a></th> + <th><a href="/packages/search/{% buildsortqs "pkgname" %}">Name</a></th> <th>Version</th> <th>Description</th> - <th><a href="{% buildsortqs "maintainer" %}">Maintainer</a></th> - <th><a href="{% buildsortqs "-last_update" %}">Last Updated</a></th> + <th><a href="/packages/search/{% buildsortqs "maintainer" %}">Maintainer</a></th> + <th><a href="/packages/search/{% buildsortqs "-last_update" %}">Last Updated</a></th> </tr> {% for pkg in package_list %} |