From 9589a7eadeb05e82c2d63f6fe128316fdb6dcc8a Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 19 Oct 2014 11:14:26 -0500 Subject: Convert package files view to Jinja2 This is another one we spend a lot of time rendering, and packges like sage-mathematics with 80,000+ files can really make the Django template engine grind. Signed-off-by: Dan McGee --- templates/packages/files.html | 2 +- templates/packages/files_list.html | 16 ---------------- templates/packages/files_list.html.jinja | 16 ++++++++++++++++ 3 files changed, 17 insertions(+), 17 deletions(-) delete mode 100644 templates/packages/files_list.html create mode 100644 templates/packages/files_list.html.jinja (limited to 'templates/packages') diff --git a/templates/packages/files.html b/templates/packages/files.html index 3e718ed0..879fcbff 100644 --- a/templates/packages/files.html +++ b/templates/packages/files.html @@ -9,7 +9,7 @@

{{ pkg.pkgname }} {{ pkg.full_version }} File List

Package has {{ files_count }} file{{ files_count|pluralize }} and {{ dir_count }} director{{ dir_count|pluralize:"y,ies" }}.

Back to Package

- {% include "packages/files_list.html" %} + {% include "packages/files_list.html.jinja" %}
diff --git a/templates/packages/files_list.html b/templates/packages/files_list.html deleted file mode 100644 index 93a2c847..00000000 --- a/templates/packages/files_list.html +++ /dev/null @@ -1,16 +0,0 @@ -{% if pkg.last_update > pkg.files_last_update %} -

Note: This file list was generated from a previous version -of the package; it may be out of date.

-{% endif %} -{% if pkg.files_last_update %} -{% if files|length %} - -{% else %} -

Package has no files.

-{% endif %} -{% else %} -

No file list available.

-{% endif %} diff --git a/templates/packages/files_list.html.jinja b/templates/packages/files_list.html.jinja new file mode 100644 index 00000000..c8fc3b1a --- /dev/null +++ b/templates/packages/files_list.html.jinja @@ -0,0 +1,16 @@ +{% if pkg.last_update > pkg.files_last_update %} +

Note: This file list was generated from a previous version +of the package; it may be out of date.

+{% endif %} +{% if pkg.files_last_update %} +{% if files|length %} + +{% else %} +

Package has no files.

+{% endif %} +{% else %} +

No file list available.

+{% endif %} -- cgit v1.2.3-54-g00ecf