Commits

Alexandre Macabies committed 7784de4 Draft

Customizable show_more template

Comments (0)

Files changed (2)

endless_pagination/settings.py

     
 # Template variable name for *page_template* decorator.
 TEMPLATE_VARNAME = getattr(settings, "ENDLESS_PAGINATION_TEMPLATE_VARNAME", "template")
+
+SHOW_MORE_TEMPLATE = getattr(settings, "ENDLESS_SHOW_MORE_TEMPLATE", "endless/show_more.html")

endless_pagination/templatetags/endless.py

         return ""
 
     
-@register.inclusion_tag("endless/show_more.html", takes_context=True)
+@register.inclusion_tag(settings.SHOW_MORE_TEMPLATE, takes_context=True)
 def show_more(context, label=None, loading=settings.LOADING):
     """
     Show the link to get the next page in a Twitter-like pagination.