From a31da80fe51f71045ce7ea2d1ca4b4212a704c13 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 26 Feb 2018 10:34:44 +0100 Subject: [PATCH] Minifixes --- db.py | 2 +- static/royal.css | 2 +- templates/leaderboards.html | 28 ++++++++++++++-------------- update.py | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/db.py b/db.py index 8c49ba9e..2b71ae5c 100644 --- a/db.py +++ b/db.py @@ -19,6 +19,7 @@ engine = create_engine(config["Database"]["database_uri"]) Base = declarative_base(bind=engine) Session = sessionmaker(bind=engine) + class Royal(Base): __tablename__ = "royals" @@ -64,7 +65,6 @@ class Telegram(Base): last_name=telegram_user.last_name, username=telegram_user.username) - def __repr__(self): return f"" diff --git a/static/royal.css b/static/royal.css index 6bf94ec8..10a9c98d 100644 --- a/static/royal.css +++ b/static/royal.css @@ -67,7 +67,7 @@ table.dota th { line-height: 14px; } -.rl-unranked { +.unranked { color: grey; } diff --git a/templates/leaderboards.html b/templates/leaderboards.html index e51f0bce..3481862e 100644 --- a/templates/leaderboards.html +++ b/templates/leaderboards.html @@ -37,16 +37,16 @@ {{ record.steam.persona_name }} {{ record.wins }} -
- {% if record.rank_tier is not none %} - {% if record.get_rank_stars_url() %}{% endif %} - {% if record.rank_tier < 10 %} - Unranked - {% elif record.rank_tier >= 10 %} - {{ record.get_rank_name() }} {{ record.get_rank_number() }} - {% endif %} - {% endif %} -
+ {% if record.rank_tier is none %} + {% elif record.rank_tier < 10 %} +
+ + {{ record.rank_tier }} piazzamenti completati +
+ {% else %} + {% if record.get_rank_stars_url() %}{% endif %} + {{ record.get_rank_name() }} {{ record.get_rank_number() }} + {% endif %} {% endfor %} @@ -82,7 +82,7 @@ {% elif record.single_mmr is not none %} -
+
{{ record.single_mmr }}
Inattivo
@@ -97,7 +97,7 @@
{% elif record.doubles_mmr is not none %} -
+
{{ record.doubles_mmr }}
Inattivo
@@ -112,7 +112,7 @@
{% elif record.standard_mmr is not none %} -
+
{{ record.standard_mmr }}
Inattivo
@@ -127,7 +127,7 @@
{% elif record.solo_std_mmr is not none %} -
+
{{ record.solo_std_mmr }}
Inattivo
diff --git a/update.py b/update.py index 51c9c8dd..1ee44c00 100644 --- a/update.py +++ b/update.py @@ -106,4 +106,4 @@ except KeyboardInterrupt: finally: print("Committing...\t\t") session.commit() - print("OK") \ No newline at end of file + print("OK")