Something
public text v1 · immutableclass Post(models.Model):
...
def list_by_category(self):
return Post.objects.filter(category=self.category)
-----
template:
-----
<h2>Related Posts</h2>
{% if list_by_category %}
{% for post in list_by_category %}
<h3><a href="{{ post.get_absolute_url }}"> etc...
...end blocks, etc.
Does it need to be post.list_by_category?