def get_context_data(self, **kwargs):
context = super(TabView, self).get_context_data(**kwargs)<EOL>context.update(kwargs)<EOL>process_tabs_kwargs = {<EOL>'<STR_LIT>': self.get_group_tabs(),<EOL>'<STR_LIT>': self,<EOL>'<STR_LIT>': self,<EOL>}<EOL>context['<STR_LIT>'] = self._process_tabs(**process_tabs_kwargs)<EOL>context['<STR_LIT>'] = self.tab_id<EOL>if self.tab_parent is not None:<EOL><INDENT>if self.tab_parent not in self._registry:<EOL><INDENT>msg = '<STR_LIT>' % self.tab_parent.__class__.__name__<EOL>raise ImproperlyConfigured(msg)<EOL><DEDENT>parent = self.tab_parent()<EOL>process_parents_kwargs = {<EOL>'<STR_LIT>': parent.get_group_tabs(),<EOL>'<STR_LIT>': self,<EOL>'<STR_LIT>': parent,<EOL>}<EOL>context['<STR_LIT>'] = self._process_tabs(**process_parents_kwargs)<EOL>context['<STR_LIT>'] = parent.tab_id<EOL><DEDENT>if self.tab_id in self._children:<EOL><INDENT>process_children_kwargs = {<EOL>'<STR_LIT>': [t() for t in self._children[self.tab_id]],<EOL>'<STR_LIT>': self,<EOL>'<STR_LIT>': None,<EOL>}<EOL>context['<STR_LIT>'] = self._process_tabs(**process_children_kwargs)<EOL><DEDENT>return context<EOL>
Adds tab information to context.

To retrieve a list of all group tab instances, use
``{{ tabs }}`` in your template.

The id of the current tab is added as ``current_tab_id`` to the
template context.

If the current tab has a parent tab the parent's id is added to
the template context as ``parent_tab_id``. Instances of all tabs
of the parent level are added as ``parent_tabs`` to the context.

If the current tab has children they are added to the template
context as ``child_tabs``.