Created
December 24, 2009 09:55
-
-
Save danielroseman/263113 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import django | |
from django.utils.translation import ugettext_lazy as _ | |
from debug_toolbar.panels import DebugPanel | |
from haystack.backends import queries | |
class HaystackDebugPanel(DebugPanel): | |
""" | |
Panel that displays the Haystack queries. | |
""" | |
name = 'Haystack' | |
has_content = True | |
def nav_title(self): | |
return _('Haystack queries') | |
def nav_subtitle(self): | |
return "%s queries" % len(queries) | |
def url(self): | |
return '' | |
def title(self): | |
return 'Haystack Queries' | |
def content(self): | |
return "".join(["<p>%s<br><br></p>" % q for q in queries]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment