添加比赛排名的封榜功能,rank页面从redis中读取排名信息而不是向mysql查询,封榜后redis中的数据便不再更新了
This commit is contained in:
@@ -20,6 +20,13 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<h2 class="text-center">排名(
|
||||
{% if real_time_rank %}
|
||||
实时
|
||||
{% else %}
|
||||
已封榜
|
||||
{% endif %})
|
||||
</h2>
|
||||
{% if result %}
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
|
||||
@@ -67,7 +67,8 @@
|
||||
<tbody>
|
||||
{% for item in submissions %}
|
||||
<tr>
|
||||
{% ifequal item.user_id request.user.id %}
|
||||
|
||||
{% if item.user_id == request.user.id and request.user.admin_type == 2%}
|
||||
<th scope="row"><a href="/submission/{{ item.id }}/">
|
||||
{{ forloop.counter |add:start_id }}</a></th>
|
||||
{% else %}
|
||||
|
||||
Reference in New Issue
Block a user