def get_nav_items(request):
    navs = {}
    if OASIS_BLOG in INSTALLED_APPS:
        from apps.OASIS_Blog.models import Category

        catdict = Category.get_ordered_hierarchy()
        navs[OASIS_BLOG[5:]] = catdict
    return {"nav": navs}
Exemplo n.º 2
0
 def get_context_data(self, **kwargs):
     context = super(BlogHomeView, self).get_context_data(**kwargs)
     context['categories'] = Category.get_ordered_hierarchy()
     return context