diff --git a/drama/routes/users.py b/drama/routes/users.py index 69d378ac5..b8b7fafaf 100644 --- a/drama/routes/users.py +++ b/drama/routes/users.py @@ -483,20 +483,14 @@ def unfollow_user(username, v): return "", 204 -@app.route("/@/pic/profile") +@app.route("/uid//pic/profile") @limiter.exempt -def user_profile(username): - x = get_user(username) - return redirect(x.profile_url) - -@app.route("/uid//pic/profile") -@limiter.exempt -def user_profile_uid(uid): - try: uid = int(uid) +def user_profile_uid(id): + try: id = int(id) except: - try: uid = int(uid, 36) + try: id = int(id, 36) except: abort(404) - x=get_account(uid) + x=get_account(id) return redirect(x.profile_url) diff --git a/drama/templates/badmins.html b/drama/templates/badmins.html index 1feff35c7..fe0bf7c7b 100644 --- a/drama/templates/badmins.html +++ b/drama/templates/badmins.html @@ -15,7 +15,7 @@ {% for user in badmins %} - {{user.username}} + {{user.username}} {{user.dramacoins}} {% endfor %} diff --git a/drama/templates/banned.html b/drama/templates/banned.html index c418f6898..3ebac6bd6 100644 --- a/drama/templates/banned.html +++ b/drama/templates/banned.html @@ -13,9 +13,9 @@ {% for user in users %} {{users.index(user)+1}} - {{user.username}} + {{user.username}} {% if user.ban_reason %}{{user.ban_reason}}{% endif %} - {% if user.banned_by %}{{user.banned_by.username}}{% endif %} + {% if user.banned_by %}{{user.banned_by.username}}{% endif %} {% endfor %} diff --git a/drama/templates/followers.html b/drama/templates/followers.html index 1eb56e8a5..8e068b02b 100644 --- a/drama/templates/followers.html +++ b/drama/templates/followers.html @@ -13,7 +13,7 @@ {% for user in users %} {{users.index(user)+1}} - {{user.username}} + {{user.username}} {% endfor %} diff --git a/drama/templates/leaderboard.html b/drama/templates/leaderboard.html index 60c0f4135..cb4554bef 100644 --- a/drama/templates/leaderboard.html +++ b/drama/templates/leaderboard.html @@ -17,7 +17,7 @@ {% for user in users1 %} {{users1.index(user)+1}} - {{user.username}} + {{user.username}} {{user.dramacoins}} {% endfor %} @@ -42,7 +42,7 @@ {% for user in users2 %} {{users2.index(user)+1}} - {{user.username}} + {{user.username}} {{user.stored_subscriber_count}} {% endfor %} @@ -67,7 +67,7 @@ {% for user in users3 %} {{users3.index(user)+1}} - {{user.username}} + {{user.username}} {{user.post_count}} {% endfor %} @@ -92,7 +92,7 @@ {% for user in users4 %} {{users4.index(user)+1}} - {{user.username}} + {{user.username}} {{user.comment_count}} {% endfor %} diff --git a/drama/templates/patrons.html b/drama/templates/patrons.html index 3dfad832c..3aa67f04a 100644 --- a/drama/templates/patrons.html +++ b/drama/templates/patrons.html @@ -13,7 +13,7 @@ {% for user in users %} {{users.index(user)+1}} - {{user.username}} + {{user.username}} diff --git a/drama/templates/rentoids.html b/drama/templates/rentoids.html index 1cf74f118..3002bacf1 100644 --- a/drama/templates/rentoids.html +++ b/drama/templates/rentoids.html @@ -13,7 +13,7 @@ {% for user in users %} {{users.index(user)+1}} - {{user.username}} + {{user.username}} {% endfor %} diff --git a/drama/templates/viewers.html b/drama/templates/viewers.html index e32380488..5e7ccbef9 100644 --- a/drama/templates/viewers.html +++ b/drama/templates/viewers.html @@ -12,7 +12,7 @@ {% for view in viewers %} - {{view.viewer.username}} + {{view.viewer.username}} {{view.last_view_string}} {% endfor %} diff --git a/drama/templates/votes.html b/drama/templates/votes.html index 194da1eb6..f216d209f 100644 --- a/drama/templates/votes.html +++ b/drama/templates/votes.html @@ -28,7 +28,7 @@ User {% for vote in ups %} - {{vote.user.username}} + {{vote.user.username}} {% endfor %} @@ -37,7 +37,7 @@ User {% for vote in downs %} - {{vote.user.username}} + {{vote.user.username}} {% endfor %}