From ffd830a8fc476427e3b9a12d1cb1930e4220e336 Mon Sep 17 00:00:00 2001 From: karastoyanov on vivobook Date: Tue, 8 Oct 2024 13:05:37 +0300 Subject: [PATCH 01/13] update Dockerfile - downgrade to python 3.12.7 - compatibility issues with 3.13.0 and `greenlet` dependency --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a26abbb..b366081 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Use the base image containing Python 3.8, NodeJS, npm, mono-complete compiler and java compiler -FROM python:latest +FROM python:3.12.7 # Image Labels. Update values for each build LABEL Name="Skill-Forge" From b57ba17982bb091723160d96dc3084e2f77ec5e0 Mon Sep 17 00:00:00 2001 From: Raya Petkova <122923696+rayapetkova@users.noreply.github.com> Date: Wed, 9 Oct 2024 22:49:47 +0300 Subject: [PATCH 02/13] Scroller ans whitespaces in bio section --- app/static/css/user_profile.css | 5 ++++- app/templates/user_profile_view.html | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/static/css/user_profile.css b/app/static/css/user_profile.css index 33dbbc2..499700c 100644 --- a/app/static/css/user_profile.css +++ b/app/static/css/user_profile.css @@ -133,7 +133,10 @@ body { text-align: justify; word-wrap: break-word; overflow-wrap: break-word; - overflow: hidden; +} + +form textarea { + overflow-y: scroll; } diff --git a/app/templates/user_profile_view.html b/app/templates/user_profile_view.html index 70c0a6a..1a43809 100644 --- a/app/templates/user_profile_view.html +++ b/app/templates/user_profile_view.html @@ -82,7 +82,7 @@

About Me

{{user.about_me}}
+ user_profile_info about_me_field whitespace-pre-wrap">{{user.about_me}}
From 1064c76b8f0b4d9e39cbef98d39b79ba061bb021 Mon Sep 17 00:00:00 2001 From: Raya Petkova <122923696+rayapetkova@users.noreply.github.com> Date: Wed, 9 Oct 2024 23:02:49 +0300 Subject: [PATCH 03/13] User-friendly flash messages --- app/routes/user_routes.py | 15 ++++++++++++++- app/templates/user_profile.html | 10 +++++----- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/app/routes/user_routes.py b/app/routes/user_routes.py index 56beadd..bbe8ae3 100644 --- a/app/routes/user_routes.py +++ b/app/routes/user_routes.py @@ -20,6 +20,19 @@ bp_usr = Blueprint('usr', __name__) +fields_flash_messages = { + 'about_me': 'About me', + 'first_name': 'First name', + 'last_name': 'Last name', + 'email': 'Email', + 'facebook_profile': 'Facebook profile', + 'instagram_profile': 'Instagram profile', + 'github_profile': 'GitHub profile', + 'discord_id': 'Discord ID', + 'linked_in': 'LinkedIn', + 'avatar': 'Avatar' +} + # Open the user profile page @bp_usr.route('/my_profile', methods=['GET', 'POST']) @login_required @@ -77,7 +90,7 @@ def open_user_profile(): else: for field, errors in form.errors.items(): for error in errors: - flash(f'{field}: {error}', 'danger') + flash(f'{fields_flash_messages[field]}: {error}', 'danger') return redirect(url_for('usr.open_user_profile')) if request.method == 'GET': diff --git a/app/templates/user_profile.html b/app/templates/user_profile.html index 6a5a70c..37512b8 100644 --- a/app/templates/user_profile.html +++ b/app/templates/user_profile.html @@ -31,11 +31,11 @@