mirror of
https://github.com/Xevion/v1.xevion.dev.git
synced 2025-12-14 08:13:26 -06:00
profile adjustments, mispell and general tiny fixes and adjustments
This commit is contained in:
@@ -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.
|
# 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.
|
# 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
|
@login.user_loader
|
||||||
class User(UserMixin, db.Model):
|
class User(UserMixin, db.Model):
|
||||||
id = db.Column(db.Integer, primary_key=True)
|
id = db.Column(db.Integer, primary_key=True)
|
||||||
@@ -19,7 +19,7 @@ class User(UserMixin, db.Model):
|
|||||||
uroles = db.Column(db.String(80), default='')
|
uroles = db.Column(db.String(80), default='')
|
||||||
about_me = db.Column(db.String(320))
|
about_me = db.Column(db.String(320))
|
||||||
last_seen = db.Column(db.DateTime, default=datetime.utcnow)
|
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):
|
def set_password(self, password):
|
||||||
self.password_hash = generate_password_hash(password)
|
self.password_hash = generate_password_hash(password)
|
||||||
|
|||||||
@@ -24,6 +24,10 @@ print = pprint.PrettyPrinter().pprint
|
|||||||
fake = faker.Faker()
|
fake = faker.Faker()
|
||||||
strgen = lambda length, charset=string.ascii_letters, weights=None : ''.join(random.choices(list(charset), k=length, weights=weights))
|
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/')
|
@app.route('/time/')
|
||||||
def time():
|
def time():
|
||||||
value = request.args.get('value')
|
value = request.args.get('value')
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<section class="section section-padding">
|
<section class="section section-padding">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="columns is-mobile is-multiline is-centered">
|
<div class="columns is-mobile is-multiline is-centered">
|
||||||
<!-- Optiosn Card -->
|
<!-- Options Card -->
|
||||||
<div class="column is-4">
|
<div class="column is-4">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
|
|||||||
@@ -1 +1,25 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
{% block body %}
|
||||||
|
|
||||||
|
<section class="section section-padding">
|
||||||
|
<div class="container">
|
||||||
|
<div class="columns is-mobile is-multiline is-centered">
|
||||||
|
<!-- Options Card -->
|
||||||
|
<div class="column is-4">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<div class="card-header-title">
|
||||||
|
{{ username }}'s Profile
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-content">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- End Options Card -->
|
||||||
|
</div>
|
||||||
|
<!-- Card Column Content -->
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{% endblock body %}}
|
||||||
Reference in New Issue
Block a user