diff options
author | Dan McGee <dan@archlinux.org> | 2011-06-20 01:09:20 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-06-20 01:09:20 -0500 |
commit | 92e13e0670661a542db646c668780cb4620c0b13 (patch) | |
tree | 8025c6587ee03241bcf4517c1e9ca00d2de1a52b /packages | |
parent | 00eb8f426a8ddb905fcf8b241eb29b687b9db8ed (diff) |
Differentiate between no filelist and empty filelist
We had these two cases munged together before; some packages have seen
filelist updates but simply don't have any files ('firefox-i18n' for
example).
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages')
-rw-r--r-- | packages/views.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/views.py b/packages/views.py index 486fb945..7b8c2e67 100644 --- a/packages/views.py +++ b/packages/views.py @@ -290,11 +290,14 @@ def files(request, name, repo, arch): pkg = get_object_or_404(Package, pkgname=name, repo__name__iexact=repo, arch__name=arch) fileslist = PackageFile.objects.filter(pkg=pkg).order_by('directory', 'filename') + context = { + 'pkg': pkg, + 'files': fileslist, + } template = 'packages/files.html' if request.is_ajax(): template = 'packages/files-list.html' - return direct_to_template(request, template, - {'pkg':pkg, 'files':fileslist}) + return direct_to_template(request, template, context) def details_json(request, name, repo, arch): pkg = get_object_or_404(Package, |