Exemplo n.º 1
0
 def field(self):
     field = super(PubDateParser, self).field
     if field:
         return field
     if hasattr(self.model, 'submit_date'):
         return 'submit_date'
     return get_field_by_type(self.model, models.DateTimeField)
Exemplo n.º 2
0
 def field(self):
     field = super(ContentParser, self).field
     if field:
         return field
     if hasattr(self.model, 'comment'):
         return 'comment'
     return get_field_by_type(self.model, models.TextField)