#NEWLINE# def debug( request ) : #NEWLINE# #INDENT# 'Returns context variables helpful for debugging.' #NEWLINE# context_extras = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if ( settings . DEBUG and ( request . META . get ( 'REMOTE_ADDR' ) in settings . INTERNAL_IPS ) ) : #NEWLINE# #INDENT# context_extras [ 'debug' ] = True #NEWLINE# from django.db import connection #NEWLINE# context_extras [ 'sql_queries' ] = connection . queries #NEWLINE# #UNINDENT# return context_extras