Compare commits
3 Commits
eeb752d605
...
ebdc3b9c9e
Author | SHA1 | Date |
---|---|---|
Starthur | ebdc3b9c9e | |
Starthur | 9d3b9ebf5f | |
Starthur | 04318e3b0a |
|
@ -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