diff options
author | Dan McGee <dan@archlinux.org> | 2011-08-09 23:35:27 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-08-09 23:35:27 -0500 |
commit | d14e80e2f04edb2f52811dba805a7ed2aa680fab (patch) | |
tree | 4c8aa8d1d4d8163534f667cb86b7ee826d274682 /packages | |
parent | b167fcb08725da983344fc18d449db6fc87d2f8a (diff) |
Add a template tag to link multiple packages at once
Comma-separated list.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages')
-rw-r--r-- | packages/templatetags/package_extras.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/templatetags/package_extras.py b/packages/templatetags/package_extras.py index 14a519d4..7bc868de 100644 --- a/packages/templatetags/package_extras.py +++ b/packages/templatetags/package_extras.py @@ -42,6 +42,10 @@ def pkg_details_link(pkg): return template % (pkg.get_absolute_url(), pkg.pkgname, pkg.pkgname) @register.simple_tag +def multi_pkg_details(pkgs): + return ', '.join([pkg_details_link(pkg) for pkg in pkgs]) + +@register.simple_tag def userpkgs(user): if user: # TODO don't hardcode |