From 7aec15c4cd0cdce216446870ce592e0ccf206420 Mon Sep 17 00:00:00 2001 From: Verox001 Date: Tue, 5 Mar 2024 10:33:28 +0100 Subject: [PATCH 1/3] Updated requirements.txt --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index fc4309f..dc40e89 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ pillow~=10.2.0 -flask~=3.0.0 \ No newline at end of file +flask~=3.0.0 +flask-login~=0.6.3 \ No newline at end of file From 295f02509c2e00110a062a84f46cb336db13e3ef Mon Sep 17 00:00:00 2001 From: Verox001 Date: Tue, 5 Mar 2024 10:37:18 +0100 Subject: [PATCH 2/3] Started app at 0.0.0.0 host --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index e4a9fa7..b92f71e 100644 --- a/app.py +++ b/app.py @@ -667,4 +667,4 @@ def add_user(): # Run the application if __name__ == '__main__': - app.run(port=5000, debug=True) + app.run(host="0.0.0.0", port=5000, debug=True) From 51742411ca10aa74a12781410ac9dd38579b3cd3 Mon Sep 17 00:00:00 2001 From: Verox001 Date: Tue, 5 Mar 2024 10:49:29 +0100 Subject: [PATCH 3/3] Fixed day count --- app.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index b92f71e..dd72258 100644 --- a/app.py +++ b/app.py @@ -208,8 +208,8 @@ def habit_create(): errors['list_query'] = 'Die Anzahl muss eine Zahl sein.' # Check if unit is day and times is one - if unit == 'Tag' and times == 1: - errors['times'] = 'Die Anzahl muss größer als 1 sein, wenn das Habit täglich ist.' + if unit == 'Tag' and times != 1: + errors['times'] = 'Die Anzahl muss 1 sein, wenn das Habit täglich ist.' if errors: return render_template( @@ -382,8 +382,8 @@ def edit_habit_change(): except ValueError: errors['list_query'] = 'Die Anzahl muss eine Zahl sein.' - if unit == 'Tag' and times == 1: - errors['times'] = 'Die Anzahl muss größer als 1 sein, wenn das Habit täglich ist.' + if unit == 'Tag' and times != 1: + errors['times'] = 'Die Anzahl muss 1 sein, wenn das Habit täglich ist.' if errors: return render_template(