debugtools/templatetags/debugtools_tags.py
def print_context(self, context):
        """
        Print the entire template context
        """
        text = [CONTEXT_TITLE]
        for i, context_scope in enumerate(context):
            dump1 = linebreaksbr(pformat_django_context_html(context_scope))
            dump2 = pformat_dict_summary_html(context_scope)

            # Collapse long objects by default (e.g. request, LANGUAGES and sql_queries)
            if len(context_scope) <= 3 and dump1.count('<br />') > 20:
                (dump1, dump2) = (dump2, dump1)

            text.append(CONTEXT_BLOCK.format(
                style=PRE_STYLE,
                num=i,
                dump1=dump1,
                dump2=dump2
            ))
        return u''.join(text)
def print_context(self, context):
        text = [CONTEXT_TITLE]
        for i, context_scope in enumerate(context):
            dump1 = linebreaksbr(pformat_django_context_html(context_scope))
            dump2 = pformat_dict_summary_html(context_scope)

            # Collapse long objects by default (e.g. request, LANGUAGES and sql_queries)
            if len(context_scope) <= 3 and dump1.count('<br />') > 20:
                (dump1, dump2) = (dump2, dump1)

            text.append(CONTEXT_BLOCK.format(
                style=PRE_STYLE,
                num=i,
                dump1=dump1,
                dump2=dump2
            ))
        return u''.join(text)
def print_context ( self , context ) : text = [ CONTEXT_TITLE ] for i , context_scope in enumerate ( context ) : dump1 = linebreaksbr ( pformat_django_context_html ( context_scope ) ) dump2 = pformat_dict_summary_html ( context_scope ) # Collapse long objects by default (e.g. request, LANGUAGES and sql_queries) if len ( context_scope ) <= 3 and dump1 . count ( '<br />' ) > 20 : ( dump1 , dump2 ) = ( dump2 , dump1 ) text . append ( CONTEXT_BLOCK . format ( style = PRE_STYLE , num = i , dump1 = dump1 , dump2 = dump2 ) ) return u'' . join ( text )
Print the entire template context
Print the entire template context