Skip to content

Commit 9fba377

Browse files
author
Pritom Gogoi
committed
add ignore-mentor update
1 parent eeb6503 commit 9fba377

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

app.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from sqlalchemy import desc
99

1010
from project import projectList
11+
from mentor import ignoreList
1112

1213
import os
1314
os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1'
@@ -69,7 +70,7 @@ def home():
6970
@app.route("/stats")
7071
def stats():
7172
all_info = userInfo.query.order_by(desc(userInfo.pr_count)).all()
72-
return render_template("stats.html", data=current_user, info=all_info)
73+
return render_template("stats.html", data=current_user, info=all_info, ignoreList=ignoreList)
7374

7475
@app.route("/stats/<int:id>", methods = ["GET"])
7576
def stats_order(id):
@@ -82,7 +83,7 @@ def stats_order(id):
8283
else:
8384
all_info = userInfo.query.order_by(desc(userInfo.commit_count)).all()
8485

85-
return render_template("stats.html", data=current_user, info=all_info)
86+
return render_template("stats.html", data=current_user, info=all_info, ignoreList=ignoreList)
8687

8788
# stats routes end
8889
@app.route("/guide")

mentor.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ignoreList = ["rusty-electron", "rajatkb", "ReboreExplore", "Rajarshi24"]

templates/stats.html

+6-1
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,26 @@
2828
<th>Total Additions</th>
2929
<th>Total Deletions</th>
3030
</tr>
31+
{% set count = namespace(a=1) %}
3132
{% for user in info %}
3233

34+
{% if user.username not in ignoreList %}
35+
3336
{% if user.username == data.username %}
3437
<tr class="found" style="cursor:pointer" onclick='window.open("{{ user.user_link }}")'>
3538
{% else %}
3639
<tr style="cursor:pointer" onclick='window.open("{{ user.user_link }}")'>
3740
{% endif %}
38-
<td>{{ loop.index }}</td>
41+
<td>{{ count.a }}</td> {% set count.a = count.a + 1 %}
3942
<td>{{ user.name }}</td>
4043
<td>{{ user.username }}</td>
4144
<td>{{ user.pr_count}} / {{user.pr_open}}</td>
4245
<td>{{ user.commit_count }}</td>
4346
<td>{{ user.line_add }}</td>
4447
<td>{{ user.line_delete }}</td></a>
4548
</tr>
49+
50+
{% endif %}
4651
{% endfor %}
4752
</table>
4853
</div>

0 commit comments

Comments
 (0)