diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2012-05-06 20:21:14 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2012-05-06 20:21:14 +0000 |
commit | 38f279ae46364bf079dbaa30a5c6cb80a47dd718 (patch) | |
tree | c9fe9b138f148d909477da5500f4b286bb186aae /packages/views | |
parent | 3d65a994502ff301f13ad153c5cd421c6bc1ea37 (diff) | |
parent | d71d0e9e9e97a1ca80bf2b81081b4b4db7fbea76 (diff) |
Merge branch 'master' of git://parabolagnulinux.org/parabolaweb
Diffstat (limited to 'packages/views')
-rw-r--r-- | packages/views/__init__.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/views/__init__.py b/packages/views/__init__.py index bbfe7c9f..7a8dabd5 100644 --- a/packages/views/__init__.py +++ b/packages/views/__init__.py @@ -169,13 +169,17 @@ 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') + dir_count = sum(1 for f in fileslist if f.is_directory) + files_count = len(fileslist) - dir_count context = { 'pkg': pkg, 'files': fileslist, + 'files_count': files_count, + 'dir_count': dir_count, } template = 'packages/files.html' if request.is_ajax(): - template = 'packages/files-list.html' + template = 'packages/files_list.html' return direct_to_template(request, template, context) def details_json(request, name, repo, arch): |