diff --git a/.gitignore b/.gitignore index d720fcdf..b098c584 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ __django reValuate/db.sqlite3 *.sqlite3 +*/media/* +*.pyc diff --git a/reValuate/api/__pycache__/views.cpython-39.pyc b/reValuate/api/__pycache__/views.cpython-39.pyc index 6408ab6d..14ff1ec2 100644 Binary files a/reValuate/api/__pycache__/views.cpython-39.pyc and b/reValuate/api/__pycache__/views.cpython-39.pyc differ diff --git a/reValuate/db.sqlite3 b/reValuate/db.sqlite3 index d2b846b3..0f38d02e 100644 Binary files a/reValuate/db.sqlite3 and b/reValuate/db.sqlite3 differ diff --git a/reValuate/home/static/home/css/style.css b/reValuate/home/static/home/css/style.css index 41859db9..296ae3e3 100644 --- a/reValuate/home/static/home/css/style.css +++ b/reValuate/home/static/home/css/style.css @@ -252,3 +252,16 @@ footer{ -webkit-animation: scale-in-center 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both; animation: scale-in-center 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both; } + +.buttons{ + background-color: #469330; + border: none; + color: white; + padding: 15px 32px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 16px; + margin: 4px 2px; + cursor: pointer; +} diff --git a/reValuate/home/views.py b/reValuate/home/views.py index 3dbecdfb..41556408 100644 --- a/reValuate/home/views.py +++ b/reValuate/home/views.py @@ -52,14 +52,17 @@ def leaderboard(request): users = User.objects.all() leaderboard = {} for i in users: - username = i.username - balance = i.balance.balanceValue - # add media counter and other stuff - if f"{username}" in leaderboard.keys(): - leaderboard[username] = balance + leaderboard[username] - else: - leaderboard[username] = balance - + try: + username = i.username + balance = i.balance.balanceValue + # add media counter and other stuff + if f"{username}" in leaderboard.keys(): + leaderboard[username] = balance + leaderboard[username] + else: + leaderboard[username] = balance + except Exception as e: + pass + leaderboard = dict(sorted(leaderboard.items(), key=operator.itemgetter(0))) leaderboard = dict(reversed(list(leaderboard.items()))) diff --git a/reValuate/templates/adminView.html b/reValuate/templates/adminView.html index 9cbf375e..0a363f79 100644 --- a/reValuate/templates/adminView.html +++ b/reValuate/templates/adminView.html @@ -2,6 +2,9 @@ {% block optionalParams %} {% endblock %} {% block content %} -