Compare commits
2 Commits
5ee37f61cf
...
ff23250275
Author | SHA1 | Date |
---|---|---|
Starthur | ff23250275 | |
Starthur | c449f26ad7 |
|
@ -23,11 +23,11 @@ def actualize_points(ctf):
|
||||||
for s in solves:
|
for s in solves:
|
||||||
s.user.userprofileinfo.score -= diff
|
s.user.userprofileinfo.score -= diff
|
||||||
s.user.userprofileinfo.save()
|
s.user.userprofileinfo.save()
|
||||||
|
|
||||||
|
|
||||||
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', 'solved_num')
|
ctfs = CTF.objects.filter(category=cat, event=None, disabled=False).order_by('points')
|
||||||
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