Skip to content

Table tags

hypha.apply.funds.templatetags.table_tags

register module-attribute

register = Library()

row_from_record

row_from_record(row, record)
Source code in hypha/apply/funds/templatetags/table_tags.py
@register.filter
def row_from_record(row, record):
    row = copy.copy(row)
    row._record = record
    return row

total_num_of_pages

total_num_of_pages(total_no_of_rows, per_page)
Source code in hypha/apply/funds/templatetags/table_tags.py
@register.simple_tag
def total_num_of_pages(total_no_of_rows, per_page):
    return math.ceil(total_no_of_rows / per_page)