diff --git a/.github/workflows/flask.yml b/.github/workflows/flask.yml index bb192c94..ccc4a798 100644 --- a/.github/workflows/flask.yml +++ b/.github/workflows/flask.yml @@ -66,6 +66,7 @@ jobs: - name: Run Tests run: | + export SECRET_KEY=`python3 -c 'import secrets; print(secrets.token_hex())'` source env/bin/activate coverage run --source='ereuse_devicehub' env/bin/pytest -m mvp --maxfail=5 tests/ coverage report --include='ereuse_devicehub/*' diff --git a/ereuse_devicehub/forms.py b/ereuse_devicehub/forms.py index 5c2b8d15..d88c9cf1 100644 --- a/ereuse_devicehub/forms.py +++ b/ereuse_devicehub/forms.py @@ -1,15 +1,14 @@ from flask_wtf import FlaskForm from werkzeug.security import generate_password_hash -from wtforms import EmailField, PasswordField, validators +from wtforms import BooleanField, EmailField, PasswordField, validators from ereuse_devicehub.resources.user.models import User class LoginForm(FlaskForm): email = EmailField('Email Address', [validators.Length(min=6, max=35)]) - password = PasswordField('Password', [ - validators.DataRequired(), - ]) + password = PasswordField('Password', [validators.DataRequired()]) + remember = BooleanField('Remember me') error_messages = { 'invalid_login': ( diff --git a/ereuse_devicehub/resources/user/models.py b/ereuse_devicehub/resources/user/models.py index c9d3fef7..70f14e00 100644 --- a/ereuse_devicehub/resources/user/models.py +++ b/ereuse_devicehub/resources/user/models.py @@ -71,6 +71,12 @@ class User(UserMixin, Thing): """Alias because flask-login expects `is_active` attribute""" return self.active + @property + def get_full_name(self): + # TODO(@slamora) create first_name & last_name fields and use + # them to generate user full name + return self.email + def check_password(self, password): # take advantage of SQL Alchemy PasswordType to verify password return self.password == password diff --git a/ereuse_devicehub/static/img/apple-touch-icon.png b/ereuse_devicehub/static/img/apple-touch-icon.png index 78b2586d..126f0035 100644 Binary files a/ereuse_devicehub/static/img/apple-touch-icon.png and b/ereuse_devicehub/static/img/apple-touch-icon.png differ diff --git a/ereuse_devicehub/static/img/favicon.png b/ereuse_devicehub/static/img/favicon.png index f9bc1743..ca34de6f 100644 Binary files a/ereuse_devicehub/static/img/favicon.png and b/ereuse_devicehub/static/img/favicon.png differ diff --git a/ereuse_devicehub/static/img/logo.png b/ereuse_devicehub/static/img/logo.png deleted file mode 100644 index 9cfbaf2d..00000000 Binary files a/ereuse_devicehub/static/img/logo.png and /dev/null differ diff --git a/ereuse_devicehub/static/img/profile-img.jpg b/ereuse_devicehub/static/img/profile-img.jpg deleted file mode 100644 index 16ac2290..00000000 Binary files a/ereuse_devicehub/static/img/profile-img.jpg and /dev/null differ diff --git a/ereuse_devicehub/static/img/usody-logo-black.svg b/ereuse_devicehub/static/img/usody-logo-black.svg new file mode 100644 index 00000000..9266981e --- /dev/null +++ b/ereuse_devicehub/static/img/usody-logo-black.svg @@ -0,0 +1,47 @@ + + diff --git a/ereuse_devicehub/templates/ereuse_devicehub/base.html b/ereuse_devicehub/templates/ereuse_devicehub/base.html index 2e323ffa..5ca885f7 100644 --- a/ereuse_devicehub/templates/ereuse_devicehub/base.html +++ b/ereuse_devicehub/templates/ereuse_devicehub/base.html @@ -5,7 +5,7 @@ -