fdfdfd
parent
5a05375a01
commit
0263b29218
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from drama.mail import *
|
||||
patronsfrom drama.mail import *
|
||||
from drama.__main__ import app, limiter
|
||||
from drama.helpers.alerts import *
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{% extends "default.html" %}
|
||||
|
||||
{% block title %}
|
||||
{% block content %}
|
||||
words words words
|
||||
{% endblock %}
|
Loading…
Reference in New Issue