Skip to content
Snippets Groups Projects
Commit ccf0be69 authored by Alice Heaton's avatar Alice Heaton :speech_balloon:
Browse files

Register the template tag. Also use the view name, not the tab name, when...

Register the template tag. Also use the view name, not the tab name, when fetching the tab to render.
parent 417bf07b
Branches
No related tags found
2 merge requests!23Tabbed view header styling,!22Tabbed page
from django import template
from django.template.loader import render_to_string
from ..tab_pool import get_tab
register = template.Library()
@register.filter(name='render_tab')
def render_tab(tab_instance):
tab = get_tab(tab_instance.name)
tab = get_tab(tab_instance.view_name)
template_name = tab.template_name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment