21 lines
476 B
Python
21 lines
476 B
Python
from django import template
|
|
|
|
|
|
register = template.Library()
|
|
|
|
|
|
@register.inclusion_tag('jci/documents_counting.html')
|
|
def count_documents(standard):
|
|
nbr_of_documents = standard.documents.count()
|
|
return {'count': nbr_of_documents}
|
|
|
|
|
|
@register.inclusion_tag('jci/_goals.html')
|
|
def parse_goals(goals):
|
|
return {'goals': goals}
|
|
|
|
|
|
@register.inclusion_tag('jci/_standards.html')
|
|
def show_standards(standards):
|
|
return {'standards': standards.all()}
|