Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 8d639b7573
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (12 sloc) 0.459 kb
import datetime
from haystack.indexes import *
from haystack import site
from plugins.models import Plugin
class PluginIndex(SearchIndex):
text = CharField(document=True, use_template=True)
created_by = CharField(model_attr='created_by')
created_on = DateTimeField(model_attr='created_on')
def index_queryset(self):
"""Only search in approved plugins."""
return Plugin.objects.approved()
site.register(Plugin, PluginIndex)
Jump to Line
Something went wrong with that request. Please try again.