Skip to content

Commit

Permalink
Merge pull request #297 from Skill-Forge-Project/development
Browse files Browse the repository at this point in the history
Skill Forge v1.4.7 patch release
  • Loading branch information
karastoyanov authored Oct 23, 2024
2 parents 0b6538d + fbdef5d commit 3f0cb35
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Use the base image containing Python 3.8, NodeJS, npm, mono-complete compiler and java compiler
# Python3.12.7 Base Image
FROM python:3.12.7

# Image Labels. Update values for each build
LABEL Name="Skill-Forge"
LABEL Version="1.4.6"
LABEL Version="1.4.7"
LABEL Release="public"
LABEL ReleaseDate="20.10.2024"
LABEL ReleaseDate="23.10.2024"
LABEL Description="Skill Forge is a open-source platform for learning and practicing programming languages."
LABEL Maintainer="Aleksandar Karastoyanov <[email protected]>"
LABEL License="GNU GPL v3.0 license"
Expand Down
2 changes: 1 addition & 1 deletion app/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class RegistrationForm(FlaskForm):
username = StringField('', render_kw={'placeholder': 'Username'}, validators=[DataRequired(message="Username is required"), Length(min=4, max=25, message="Username must be between 4 and 25 characters.")])
first_name = StringField('', render_kw={'placeholder': 'First name'}, validators=[DataRequired(message="First name is required"), Length(min=1, max=30, message="First name must be between 1 and 30 characters.")])
last_name = StringField('', render_kw={'placeholder': 'Last name'}, validators=[DataRequired(message="Last name is required"), Length(min=1, max=30, message="Last name must be between 1 and 30 characters.")])
email = StringField('', render_kw={'placeholder': 'Email address'}, validators=[DataRequired(message="Email address is required"), Email(message="Invalid emal address"), latin_characters_only])
email = StringField('', render_kw={'placeholder': 'Email address'}, validators=[DataRequired(message="Email address is required"), Email(message="Invalid email address"), latin_characters_only])
password = PasswordField('', validators=[
DataRequired(message="Password is required"),
Length(min=10, max=50, message='Password must be between 10 and 50 characters.'),
Expand Down
6 changes: 5 additions & 1 deletion app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

script_dir = os.path.dirname(os.path.abspath(__file__))

# Set the default avatar
def set_default_avatar():
with open('app/static/images/achievements-icons/General/quest_approved.png', 'rb') as f:
return f.read()

########### Define the User model ###########
class User(UserMixin, db.Model):
Expand All @@ -24,7 +28,7 @@ class User(UserMixin, db.Model):
xp = db.Column(db.Integer, default=0, nullable=False)
level = db.Column(db.Integer, default=1, nullable=False)
rank = db.Column(db.String(30), default="Neophyte")
avatar = db.Column(db.LargeBinary, default=None)
avatar = db.Column(db.LargeBinary, default=set_default_avatar, nullable=False)
date_registered = db.Column(db.DateTime, default=datetime.now(), nullable=False)
password = db.Column(db.String(120), nullable=False)
total_solved_quests = db.Column(db.Integer, default=0, nullable=False)
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[metadata]
name = Skill-Forge
version = 1.4.6
release_date = 20.10.2024
version = 1.4.7
release_date = 23.10.2024
description = Skill Forge is a open-source platform for learning and practicing programming languages.
author = Aleksandar Karastoyanov
author_email = [email protected]
Expand Down

0 comments on commit 3f0cb35

Please sign in to comment.