diff options
Diffstat (limited to 'source')
-rwxr-xr-x | source/pyAggr3g470r.py | 28 | ||||
-rwxr-xr-x | source/utils.py | 2 |
2 files changed, 1 insertions, 29 deletions
diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py index e8ba1db0..7c4c8fde 100755 --- a/source/pyAggr3g470r.py +++ b/source/pyAggr3g470r.py @@ -237,7 +237,7 @@ class Root: return html + "</div>" - def management(self, max_nb_articles=5): + def management(self): """ Management page. Allows adding and deleting feeds. Export functions of the MongoDB data base @@ -282,18 +282,6 @@ class Root: html += """<form method=get action="/fetch/">\n<input type="submit" value="Fetch all feeds"></form>\n""" html += """<form method=get action="/drop_base">\n<input type="submit" value="Delete all articles"></form>\n""" - - html += '<form method=get action="/set_max_articles/">\n' - html += "For each feed only load the " - html += """<input type="number" name="max_nb_articles" value="%s" min="1" step="1" size="2">\n""" % (max_nb_articles) - html += " last articles." - if utils.MAX_NB_ARTICLES == -1: - html += "<br />All articles are currently loaded.\n" - else: - html += "<br />For each feed only " + str(utils.MAX_NB_ARTICLES) + " articles are currently loaded. " - html += '<a href="/set_max_articles/-1">Load all articles.</a><br />\n' - html += "</form>\n" - # Export functions html += "<h1>Export articles</h1>\n\n" html += """<form method=get action="/export/"><select name="export_method">\n""" @@ -1170,20 +1158,6 @@ class Root: change_feed_logo.exposed = True - - def set_max_articles(self, max_nb_articles=1): - """ - Enables to set the maximum of articles to be loaded per feed from - the data base. - """ - if max_nb_articles < -1 or max_nb_articles == 0: - max_nb_articles = 1 - utils.MAX_NB_ARTICLES = int(max_nb_articles) - return self.management() - - set_max_articles.exposed = True - - def delete_article(self, param): """ Delete an article. diff --git a/source/utils.py b/source/utils.py index 0928160a..6230f005 100755 --- a/source/utils.py +++ b/source/utils.py @@ -68,8 +68,6 @@ MONGODB_PORT = int(config.get('MongoDB', 'port')) MONGODB_USER = config.get('MongoDB', 'user') MONGODB_PASSWORD = config.get('MongoDB', 'password') -MAX_NB_ARTICLES = int(config.get('global', 'max_nb_articles')) - mail_from = config.get('mail','mail_from') mail_to = config.get('mail','mail_to') smtp_server = config.get('mail','smtp') |