diff options
author | Dan McGee <dan@archlinux.org> | 2014-10-18 13:48:07 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2014-10-18 13:48:07 -0500 |
commit | 2f19529c922172007ff3894ad0e0fca0b3e33f5b (patch) | |
tree | 7287ec88e69e2d09e6c73e6a9ba3a013b354c9ab /templates/packages/details_requiredby.html.jinja | |
parent | f4a6eff33815a713b1141ea94a872bd7c6233699 (diff) |
Convert details sub-tempates to Jinja2
This is a start at improving performance of rendering the package
details page, our most-visited and slowest page on the production
website. The Django template system is not very efficient due to our
heavy use of broken out templates and pulling of various attributes and
such on related packages.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates/packages/details_requiredby.html.jinja')
-rw-r--r-- | templates/packages/details_requiredby.html.jinja | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/templates/packages/details_requiredby.html.jinja b/templates/packages/details_requiredby.html.jinja new file mode 100644 index 00000000..b083a7fc --- /dev/null +++ b/templates/packages/details_requiredby.html.jinja @@ -0,0 +1,8 @@ +{% import 'packages/details_link.html.jinja' as details %}<li>{{ details.details_link(req.pkg) }} +{% if req.name != pkg.pkgname %}<span class="virtual-dep"> (requires {{ req.name }})</span> +{% endif %}{% if req.pkg.repo.testing %}<span class="testing-dep"> (testing)</span> +{% endif %}{% if req.pkg.repo.staging %}<span class="staging-dep"> (staging)</span> +{% endif %}{% if req.deptype == 'O' %}<span class="opt-dep"> (optional)</span> +{% endif %}{% if req.deptype == 'M' %}<span class="make-dep"> (make)</span> +{% endif %}{% if req.deptype == 'C' %}<span class="check-dep"> (check)</span> +{% endif %}</li> |