From 4fffb9c1d59d7563b0dafc74195f6176c900ee34 Mon Sep 17 00:00:00 2001 From: Bert Roelofsen <19684880+systeembeheerder@users.noreply.github.com> Date: Thu, 22 Feb 2024 10:29:06 +0100 Subject: [PATCH] restore extra spaces --- snappass/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/snappass/main.py b/snappass/main.py index 826c78f..ab16b2d 100644 --- a/snappass/main.py +++ b/snappass/main.py @@ -17,6 +17,7 @@ URL_PREFIX = os.environ.get('URL_PREFIX', None) HOST_OVERRIDE = os.environ.get('HOST_OVERRIDE', None) TOKEN_SEPARATOR = '~' + # Initialize Flask Application app = Flask(__name__) if os.environ.get('DEBUG'): @@ -28,6 +29,8 @@ app.config.update( # Set up Babel def get_locale(): return request.accept_languages.best_match(['en', 'es', 'de', 'nl']) + + babel = Babel(app, locale_selector=get_locale) # Initialize Redis @@ -61,6 +64,7 @@ def check_redis_alive(fn): return abort(500) return inner + def encrypt(password): """ Take a password string, encrypt it with Fernet symmetric encryption, @@ -216,5 +220,6 @@ def health_check(): def main(): app.run(host='0.0.0.0') + if __name__ == '__main__': main()