Skip to content

Instantly share code, notes, and snippets.

View bjornuppeke's full-sized avatar

Björn Uppeke bjornuppeke

  • Helicon Technologies
  • Stockholm
View GitHub Profile
@bjornuppeke
bjornuppeke / extended_menu_tags.py
Created June 9, 2016 16:35
Extends Django CMS sub menu template tag and adds pagination
from django import template
from classytags.arguments import IntegerArgument, Argument, StringArgument
from classytags.core import Options
from menus.templatetags.menu_tags import ShowSubMenu
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
register = template.Library()
class ShowPaginatedSubMenu(ShowSubMenu):