From a1d0ac9f905bd008a16cc7f949c019a28a5956a3 Mon Sep 17 00:00:00 2001 From: Fluffy-Bean Date: Thu, 20 Apr 2023 20:47:04 +0000 Subject: [PATCH] Add options to profile Upload profile picture Change username --- onlylegs/models.py | 2 +- onlylegs/templates/profile.html | 20 ++++++++++++++++++-- onlylegs/templates/settings.html | 10 ++++++++++ 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/onlylegs/models.py b/onlylegs/models.py index 2b3f88b..af3eb6f 100644 --- a/onlylegs/models.py +++ b/onlylegs/models.py @@ -88,7 +88,7 @@ class User(db.Model, UserMixin): # pylint: disable=too-few-public-methods, C010 alt_id = db.Column(db.String, unique=True, nullable=False, default=str(uuid4())) picture = db.Column(db.String, default=None) - colour = db.Column(db.String, default=None) + colour = db.Column(db.PickleType, default=None) banner = db.Column(db.String, default=None) username = db.Column(db.String, unique=True, nullable=False) diff --git a/onlylegs/templates/profile.html b/onlylegs/templates/profile.html index c20bae8..11501f9 100644 --- a/onlylegs/templates/profile.html +++ b/onlylegs/templates/profile.html @@ -1,5 +1,21 @@ {% extends 'layout.html' %} +{% block head %} + {% if user.picture %} + + {% endif %} + {% if user.colour %} + + {% endif %} + + + +{% endblock %} {% block nav_profile %}selected{% endblock %} {% block content %}