Compare commits
1 Commits
main
...
ctf-ordere
Author | SHA1 | Date |
---|---|---|
Starthur | 121d06aff2 |
|
@ -27,7 +27,7 @@ def actualize_points(ctf):
|
||||||
|
|
||||||
def category(request, cat_slug):
|
def category(request, cat_slug):
|
||||||
cat = get_object_or_404(Category, slug=cat_slug)
|
cat = get_object_or_404(Category, slug=cat_slug)
|
||||||
ctfs = CTF.objects.filter(category=cat, event=None, disabled=False).order_by('points')
|
ctfs = CTF.objects.filter(category=cat, event=None, disabled=False).order_by('points', 'solved_num')
|
||||||
for ex in ctfs:
|
for ex in ctfs:
|
||||||
ex.solved_num = CTF_flags.objects.filter(ctf=ex).count()
|
ex.solved_num = CTF_flags.objects.filter(ctf=ex).count()
|
||||||
ex.solved = ex.solved_by(request.user)
|
ex.solved = ex.solved_by(request.user)
|
||||||
|
|
Loading…
Reference in New Issue