From 6f2891327e5c71fb4f4759fe539525b9a21c5d65 Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Tue, 2 Feb 2016 14:44:42 -0200 Subject: [PATCH] Add docs --- base/templatetags/menus.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/base/templatetags/menus.py b/base/templatetags/menus.py index 835c9f0a6..257b801ee 100644 --- a/base/templatetags/menus.py +++ b/base/templatetags/menus.py @@ -11,6 +11,10 @@ TEMPLATES_DIR = BASE_DIR.child("templates") @register.inclusion_tag('menus/subnav.html', takes_context=True) def subnav(context, path=None): + """Renders a subnavigation for views of a certain object. + + If not provided, path defaults to /subnav.yaml + """ obj = context['object'] if not path: path = '%s/subnav.yaml' % obj.__class__._meta.app_label