1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-06-21 04:38:21 +02:00

We can only register during the first phase

This commit is contained in:
Yohann D'ANELLO
2020-11-15 01:50:12 +01:00
parent d3e18a8fbb
commit 731f8711ff
7 changed files with 112 additions and 100 deletions

View File

@ -0,0 +1,12 @@
from django import template
from ..models import Phase
def current_phase(nb):
phase = Phase.current_phase()
return phase is not None and phase.phase_number == nb
register = template.Library()
register.filter("current_phase", current_phase)