debugtools/panels/view.py
def _get_view_data(self, context_data):
        """
        Extract the used view from the TemplateResponse context (ContextMixin)
        """
        view = context_data.get('view')
        if not isinstance(view, View):
            view = None

        # Denote interesting objects in the template context
        template_context = []
        for key, obj in context_data.items():
            if isinstance(obj, (BaseForm, BaseFormSet, Model)):
                template_context.append((key, _format_path(obj.__class__)))

        return {
            'model': _get_view_model(view),
            'form': _get_form_class(view),
            'template_context': template_context,
        }
def _get_view_data(self, context_data):
        """
        Extract the used view from the TemplateResponse context (ContextMixin)
        """
        view = context_data.get('view')
        if not isinstance(view, View):
            view = None

        # Denote interesting objects in the template context
        template_context = []
        for key, obj in context_data.items():
            if isinstance(obj, (BaseForm, BaseFormSet, Model)):
                template_context.append((key, _format_path(obj.__class__)))

        return {
            'model': _get_view_model(view),
            'form': _get_form_class(view),
            'template_context': template_context,
        }
Extract the used view from the TemplateResponse context (ContextMixin)