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:
0
apps/participation/templatetags/__init__.py
Normal file
0
apps/participation/templatetags/__init__.py
Normal file
12
apps/participation/templatetags/calendar.py
Normal file
12
apps/participation/templatetags/calendar.py
Normal 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)
|
Reference in New Issue
Block a user