remotes/1693045480750635534/spooky-22
Aevann1 2021-07-31 11:18:59 +02:00
parent 5a05375a01
commit 0263b29218
4 changed files with 9 additions and 10 deletions

View File

@ -300,17 +300,17 @@ class User(Base, Stndrd, Age_times):
@lazy
def display_awards(self):
_awards = {}
awards = {}
active_awards = [x for x in self.awards if not x.given]
for a in active_awards:
if a.kind in _awards:
_awards[a.kind]['count'] += 1
if a.kind in awards:
awards[a.kind]['count'] += 1
else:
_awards[a.kind] = a.type
_awards[a.kind]['count'] = 1
awards[a.kind] = a.type
awards[a.kind]['count'] = 1
return list(_awards.values())
return sorted(list(awards.values()), key=lambda x: x.kind, reverse=True)
@property
@lazy

View File

@ -357,8 +357,7 @@ def settings_images_banner(v):
v.bannerurl = imageurl
g.db.add(v)
return render_template("settings_profile.html",
v=v, msg="Banner successfully updated.")
return render_template("settings_profile.html", v=v, msg="Banner successfully updated.")
@app.post("/settings/delete/profile")

View File

@ -1,4 +1,4 @@
from drama.mail import *
patronsfrom drama.mail import *
from drama.__main__ import app, limiter
from drama.helpers.alerts import *

View File

@ -1,5 +1,5 @@
{% extends "default.html" %}
{% block title %}
{% block content %}
words words words
{% endblock %}