<s> from django . utils import timezone <EOL> from haystack import indexes <EOL> from . models import Job <EOL> class JobIndex ( indexes . SearchIndex , indexes . Indexable ) : <EOL> text = indexes . CharField ( document = True , use_template = True ) <EOL> submission_email = indexes . CharField ( model_attr = '<STR_LIT>' ) <EOL> submission_closes = indexes . DateTimeField ( model_attr = '<STR_LIT>' ) <EOL> def get_model ( self ) : <EOL> return Job <EOL> def get_updated_field ( self ) : <EOL> return '<STR_LIT>' <EOL> def index_queryset ( self , using = None ) : <EOL> now = timezone . now ( ) <EOL> return self . get_model ( ) . objects . filter ( submission_closes__gt = now ) </s>
