Topic.talks() -> Topic.talk_set
This commit is contained in:
parent
c79181fe4b
commit
8fa2341ff6
|
@ -25,10 +25,6 @@ class Topic(PonyConfModel):
|
|||
|
||||
reviewers = models.ManyToManyField(User, blank=True)
|
||||
|
||||
@property
|
||||
def talks(self):
|
||||
return Talk.objects.filter(topics=self).all()
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
{{ topic }}:
|
||||
<a href="{% url 'edit-topic' topic.slug %}">{{ topic.reviewers.count }} reviewer{{ topic.reviewers.count|pluralize }}</a>
|
||||
and
|
||||
<a href="{{ topic.get_absolute_url }}">{{ topic.talks.count }} talk{{ topic.talks.count|pluralize }}</a>
|
||||
<a href="{{ topic.get_absolute_url }}">{{ topic.talk_set.count }} talk{{ topic.talk_set.count|pluralize }}</a>
|
||||
{% else %}
|
||||
<a href="{{ topic.get_absolute_url }}">{{ topic }}</a>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue