forked from 42CTF/website
Merge pull request 'challenges_created' (#56) from challenges_created into main
Reviewed-on: 42CTF/website#56
This commit is contained in:
commit
ebdc3b9c9e
|
@ -75,6 +75,19 @@
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<ul class="list-group">
|
||||||
|
<ul class="list-group">
|
||||||
|
<li class="list-group-item">{% trans "Challenges created" %}</li>
|
||||||
|
{% if created %}
|
||||||
|
{% for creat in created %}
|
||||||
|
<li class="list-group-item"><a href="{% url 'ctf' cat_slug=creat.category.slug ctf_slug=creat.slug %}">{{ creat.name }}</a></li>
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
<p>{% trans "It seems that this user has not created any challenge yet..." %}</p>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -151,9 +151,9 @@ def profile(request, user_name):
|
||||||
for s in solves.reverse():
|
for s in solves.reverse():
|
||||||
somme += s.ctf.points
|
somme += s.ctf.points
|
||||||
solved.append([s.flag_date.timestamp() * 1000,somme])
|
solved.append([s.flag_date.timestamp() * 1000,somme])
|
||||||
|
created = CTF.objects.filter(author=user_obj)
|
||||||
return render(request,'accounts/profile.html', {'user':user_obj, 'solves':solves,'solved':solved,'catsDatas': catsDatas, 'pointDatas': pointDatas,
|
return render(request,'accounts/profile.html', {'user':user_obj, 'solves':solves,'solved':solved,'catsDatas': catsDatas, 'pointDatas': pointDatas,
|
||||||
'rank': rank, 'score' : somme, 'member' : member, 'cats':cats})
|
'rank': rank, 'score' : somme, 'member' : member, 'cats':cats, 'created':created})
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
def delete_account(request):
|
def delete_account(request):
|
||||||
|
|
Loading…
Reference in New Issue