Django, filter records from model method? <p>I'm trying to filter records using a model method but am unsure how to implement it in the view.</p> <p>Should it be done in this way, or completely in the view in some other manor?</p> <p>Here's my model below:</p> <pre><code>class Message(models.Model): msg_id = models.IntegerField(unique=True) user = models.ForeignKey(User) message = models.CharField(max_length=300) added = models.DateTimeField('added') def about_cats(self): matches = ['cat', 'kitty', 'meow'] return any(s in self.message for s in matches) def __unicode__(self): return self.message </code></pre>