From 6806497c0948775a0da7cc06e49ed90fe7484d80 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sat, 12 Apr 2014 18:43:07 +0200 Subject: Export of all articles in HTML pages is now working again (but not yet on Heroku). --- pyaggr3g470r/export.py | 14 +++++++------- pyaggr3g470r/utils.py | 5 ++--- pyaggr3g470r/views.py | 8 ++++++-- 3 files changed, 15 insertions(+), 12 deletions(-) (limited to 'pyaggr3g470r') diff --git a/pyaggr3g470r/export.py b/pyaggr3g470r/export.py index 3432e0f3..da63774e 100644 --- a/pyaggr3g470r/export.py +++ b/pyaggr3g470r/export.py @@ -132,29 +132,29 @@ img { margin:1.00em 1.00em; }""" -def export_html(feeds): +def export_html(user): """ - Export the articles given in parameter in a simple Webzine. + Export all articles of 'user' in Web pages. """ webzine_root = conf.PATH + "/pyaggr3g470r/var/export/webzine/" - nb_articles = format(len(models.Article.objects()), ",d") + nb_articles = format(len(models.Article.query.filter(models.Article.user_id == user.id).all()), ",d") index = HTML_HEADER("News archive") index += "

List of feeds

\n" index += """

%s articles.

\n