# Originally based on: http://djangosnippets.org/snippets/1872/ # Requires sqlparse: http://pypi.python.org/pypi/sqlparse import time from django.test.signals import template_rendered from django.conf import settings from django.db import connection from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe TEMPLATE = """