diff options
-rw-r--r-- | instance/production.py | 12 | ||||
-rw-r--r-- | newspipe/web/views/feed.py | 6 |
2 files changed, 12 insertions, 6 deletions
diff --git a/instance/production.py b/instance/production.py index 76b0bcb6..9dc56a76 100644 --- a/instance/production.py +++ b/instance/production.py @@ -1,11 +1,15 @@ +import os + # Webserver HOST = "127.0.0.1" PORT = 5000 DEBUG = False API_ROOT = "/api/v2.0" +CSRF_ENABLED = True SECRET_KEY = "LCx3BchmHRxFzkEv4BqQJyeXRLXenf" SECURITY_PASSWORD_SALT = "L8gTsyrpRQEF8jNWQPyvRfv7U5kJkD" +TOKEN_VALIDITY_PERIOD = 3600 # Database DB_CONFIG_DICT = { @@ -24,10 +28,10 @@ CRAWLING_METHOD = "default" DEFAULT_MAX_ERROR = 3 HTTP_PROXY = "" CRAWLER_USER_AGENT = "Newspipe (https://git.sr.ht/~cedric/newspipe)" -CRAWLER_TIMEOUT = 5 +CRAWLER_TIMEOUT = 30 CRAWLER_RESOLV = False RESOLVE_ARTICLE_URL = False -FEED_REFRESH_INTERVAL = 100 +FEED_REFRESH_INTERVAL = 120 # Notification MAIL_SERVER = "localhost" @@ -40,8 +44,10 @@ MAIL_PASSWORD = None MAIL_DEFAULT_SENDER = ADMIN_EMAIL # Misc +BASE_DIR = os.path.abspath(os.path.dirname('.')) +LANGUAGES = {"en": "English", "fr": "French"} +TIME_ZONE = {"en": "US/Eastern", "fr": "Europe/Paris"} ADMIN_EMAIL = "admin@admin.localhost" -TOKEN_VALIDITY_PERIOD = 3600 LOG_LEVEL = "info" LOG_PATH = "./var/newspipe.log" SELF_REGISTRATION = True diff --git a/newspipe/web/views/feed.py b/newspipe/web/views/feed.py index ec69e301..fc68c23c 100644 --- a/newspipe/web/views/feed.py +++ b/newspipe/web/views/feed.py @@ -179,7 +179,7 @@ def bookmarklet(): ) feed = feed_contr.create(**feed) flash(gettext("Feed was successfully created."), "success") - if feed.enabled and application.confg["CRAWLING_METHOD"] == "default": + if feed.enabled and application.config["CRAWLING_METHOD"] == "default": misc_utils.fetch(current_user.id, feed.id) flash(gettext("Downloading articles for the new feed..."), "info") return redirect(url_for("feed.form", feed_id=feed.id)) @@ -286,7 +286,7 @@ def process_form(feed_id=None): "success", ) - if application.confg["CRAWLING_METHOD"] == "default": + if application.config["CRAWLING_METHOD"] == "default": misc_utils.fetch(current_user.id, new_feed.id) flash(gettext("Downloading articles for the new feed..."), "info") @@ -335,7 +335,7 @@ def export(): if not include_private: filter["private"] = False if not include_exceeded_error_count: - filter["error_count__lt"] = application.confg["DEFAULT_MAX_ERROR"] + filter["error_count__lt"] = application.config["DEFAULT_MAX_ERROR"] user = UserController(current_user.id).get(id=current_user.id) feeds = FeedController(current_user.id).read(**filter) |