from django import template

register = template.Library()

@register.inclusion_tag("templatetags/pagination_controls.html", takes_context=True)
def render_pagination(context, page_obj, hide_if_one_page=True):
    """
    Renders the pagination controls given a page_obj. Optionally hides the controls if there is only one page.
    """
    return {"page_obj": page_obj, "hide_if_one_page": hide_if_one_page} 