<s> from django . db import models <EOL> from django . utils . translation import ugettext_lazy as _ <EOL> from panda . models . category import Category <EOL> from panda . models . dataset import Dataset <EOL> from panda . models . user_proxy import UserProxy <EOL> class SearchSubscription ( models . Model ) : <EOL> """<STR_LIT>""" <EOL> user = models . ForeignKey ( UserProxy , related_name = '<STR_LIT>' , <EOL> help_text = _ ( '<STR_LIT>' ) , <EOL> verbose_name = _ ( '<STR_LIT:user>' ) ) <EOL> dataset = models . ForeignKey ( Dataset , related_name = '<STR_LIT>' , null = True , default = None , <EOL> help_text = _ ( '<STR_LIT>' ) , <EOL> verbose_name = _ ( '<STR_LIT>' ) ) <EOL> category = models . ForeignKey ( Category , related_name = '<STR_LIT>' , null = True , default = None , <EOL> help_text = _ ( '<STR_LIT>' ) , <EOL> verbose_name = _ ( '<STR_LIT>' ) ) <EOL> query = models . CharField ( _ ( '<STR_LIT>' ) , max_length = <NUM_LIT> , <EOL> help_text = _ ( '<STR_LIT>' ) ) <EOL> query_url = models . CharField ( _ ( '<STR_LIT>' ) , max_length = <NUM_LIT> , <EOL> help_text = _ ( '<STR_LIT>' ) ) <EOL> query_human = models . TextField ( _ ( '<STR_LIT>' ) , <EOL> help_text = _ ( '<STR_LIT>' ) ) <EOL> last_run = models . DateTimeField ( _ ( '<STR_LIT>' ) , auto_now = True , <EOL> help_text = _ ( '<STR_LIT>' ) ) <EOL> class Meta : <EOL> app_label = '<STR_LIT>' <EOL> verbose_name = _ ( '<STR_LIT>' ) <EOL> verbose_name_plural = _ ( '<STR_LIT>' ) <EOL> def __unicode__ ( self ) : <EOL> if self . dataset : <EOL> return _ ( '<STR_LIT>' ) % { '<STR_LIT:user>' : self . user , '<STR_LIT>' : self . query , '<STR_LIT>' : self . dataset } <EOL> else : <EOL> return _ ( '<STR_LIT>' ) % { '<STR_LIT:user>' : self . user , '<STR_LIT>' : self . query } </s>
