13 lines
253 B
Python
13 lines
253 B
Python
|
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)
|