From 738b45556935d4e0075de5831b6f333ddcbd4647 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Mon, 7 Apr 2014 23:49:54 +0200 Subject: Beginning of the port to PostgreSQL. --- pyaggr3g470r/templates/feed.html | 12 ++++++------ pyaggr3g470r/templates/home.html | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'pyaggr3g470r/templates') diff --git a/pyaggr3g470r/templates/feed.html b/pyaggr3g470r/templates/feed.html index 95465170..849dba49 100644 --- a/pyaggr3g470r/templates/feed.html +++ b/pyaggr3g470r/templates/feed.html @@ -4,14 +4,14 @@

{{ feed.title }}

{% if feed.description %}

{{ feed.description }}

{% endif %} - - + +

- This feed contains {{ feed.articles|count }} articles + This feed contains {{ feed.articles.all()|count }} articles {% if nb_articles != 0 %} - ({{ ((feed.articles|count * 100 ) / nb_articles) | round(2, 'floor') }}% of the database) + ({{ ((feed.articles.all()|count * 100 ) / nb_articles) | round(2, 'floor') }}% of the database) {% endif %} .
Address of the feed: {{ feed.link }}
@@ -19,14 +19,14 @@ Address of the site: {{ feed.site_link }} {% endif %}
- {% if feed.articles|count != 0 %} + {% if feed.articles.all()|count != 0 %} The last article was posted {{ elapsed.days }} day(s) ago.
Daily average: {{ average }}, between the {{ first_post_date.strftime('%Y-%m-%d') }} and the {{ end_post_date.strftime('%Y-%m-%d') }}. {% endif %}

- {% if feed.articles|count != 0 %} + {% if feed.articles.all()|count != 0 %}
{{ tag_cloud|safe }}
{% endif %}
diff --git a/pyaggr3g470r/templates/home.html b/pyaggr3g470r/templates/home.html index 9117bce9..8a4e429d 100644 --- a/pyaggr3g470r/templates/home.html +++ b/pyaggr3g470r/templates/home.html @@ -8,16 +8,16 @@

{{ feed.title|safe }}

- - - + + + {% if feed.enabled %} - + {% endif %} - +
- {% for number in range(0, feed.articles|length-(feed.articles|length % 3), 3) %} + {% for number in range(0, feed.articles.all()|count-(feed.articles.all()|count % 3), 3) %}
{% for n in range(number, number+3) %}
@@ -29,9 +29,9 @@ {% endfor %}
{% endfor %} - {% if feed.articles|length % 3 != 0 %} + {% if feed.articles.all()|count % 3 != 0 %}
- {% for n in range(feed.articles|length-(feed.articles|length % 3), feed.articles|length) %} + {% for n in range(feed.articles.all()|count-(feed.articles.all()|count % 3), feed.articles.all()|count) %}
{% if feed.articles[n].readed %}

{% else %}

{% endif %} {{ feed.articles[n].title|safe }} -- cgit