diff options
Diffstat (limited to 'pyaggr3g470r/views.py')
-rw-r--r-- | pyaggr3g470r/views.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py index d0b410ee..81462100 100644 --- a/pyaggr3g470r/views.py +++ b/pyaggr3g470r/views.py @@ -394,11 +394,14 @@ def export_articles(): Export all articles. """ user = User.query.filter(User.id == g.user.id).first() + archive_file, archive_file_name = export.export_html(user) + """ try: archive_file, archive_file_name = export.export_html(user.feeds) except: flash("Error when exporting articles.", 'danger') return redirect(url_for('management')) + """ response = make_response(archive_file) response.headers['Content-Type'] = 'application/x-compressed' response.headers['Content-Disposition'] = 'attachment; filename='+archive_file_name @@ -453,8 +456,9 @@ def management(): opml_path = os.path.join("./pyaggr3g470r/var/", data.filename) data.save(opml_path) try: - nb = utils.import_opml(g.user.email, opml_path) - flash(str(nb) + " feeds imported.", "success") + nb, nb_already = utils.import_opml(g.user.email, opml_path) + flash(str(nb) + " feeds imported (" + str(nb_already) + \ + " already in the database).", "success") except Exception as e: flash("Impossible to import the new feeds.", "danger") |