From 39d8eaf8d81bce1cf05ae1472f94397b80c13f53 Mon Sep 17 00:00:00 2001 From: Xevion Date: Fri, 20 Dec 2019 22:00:34 -0600 Subject: [PATCH] profile adjustments, mispell and general tiny fixes and adjustments --- app/api | 0 app/models.py | 4 ++-- app/routes.py | 4 ++++ app/templates/hidden.html | 2 +- app/templates/profile.html | 26 +++++++++++++++++++++++++- 5 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 app/api diff --git a/app/api b/app/api new file mode 100644 index 0000000..e69de29 diff --git a/app/models.py b/app/models.py index 8bf2817..a12cead 100644 --- a/app/models.py +++ b/app/models.py @@ -6,7 +6,7 @@ from werkzeug.security import generate_password_hash, check_password_hash # Just a note, my role system is really quite terrible, but I've implemented as good as a system as I can for a simple RBAC without Hierarchy. # Once could create a complex system, but it would be better to properly work with SQLAlchemy to create proper permissions, hierarchy, parent/child etc. rather than to work with simple strings. -# One should look into perhaps Pickled Pytthon objects if they were interested in simplfiying interactions while opening a lot more data storage. +# One should look into perhaps Pickled Python objects if they were interested in simplifying interactions while opening a lot more data storage. @login.user_loader class User(UserMixin, db.Model): id = db.Column(db.Integer, primary_key=True) @@ -19,7 +19,7 @@ class User(UserMixin, db.Model): uroles = db.Column(db.String(80), default='') about_me = db.Column(db.String(320)) last_seen = db.Column(db.DateTime, default=datetime.utcnow) - show_email = db.Column + show_email = db.Column(db.Boolean, default=False) def set_password(self, password): self.password_hash = generate_password_hash(password) diff --git a/app/routes.py b/app/routes.py index 3eae538..f70a2f9 100644 --- a/app/routes.py +++ b/app/routes.py @@ -24,6 +24,10 @@ print = pprint.PrettyPrinter().pprint fake = faker.Faker() strgen = lambda length, charset=string.ascii_letters, weights=None : ''.join(random.choices(list(charset), k=length, weights=weights)) +@app.route('/', subdomain='api') +def api_index(): + return "api" + @app.route('/time/') def time(): value = request.args.get('value') diff --git a/app/templates/hidden.html b/app/templates/hidden.html index a32d0a4..c5d7b05 100644 --- a/app/templates/hidden.html +++ b/app/templates/hidden.html @@ -21,7 +21,7 @@
- +
diff --git a/app/templates/profile.html b/app/templates/profile.html index 838aa18..769ecce 100644 --- a/app/templates/profile.html +++ b/app/templates/profile.html @@ -1 +1,25 @@ -{% extends 'base.html' %} \ No newline at end of file +{% extends 'base.html' %} +{% block body %} + +
+
+
+ +
+
+
+
+ {{ username }}'s Profile +
+
+
+
+
+
+ +
+ +
+
+ +{% endblock body %}} \ No newline at end of file