diff --git a/article/models.py b/article/models.py index 9f7191d1..36f5ccd9 100644 --- a/article/models.py +++ b/article/models.py @@ -270,7 +270,7 @@ class Article(TranslatableModel): themes = self.theme.all().values_list('pk', flat=True) exclude_pks = set([self.pk]) qs = model.objects.language()\ - .filter(type=self.type, publish_date__isnull=False).distinct().order_by('-publish_date') + .filter(type=self.type, draft=False, publish_date__isnull=False).distinct().order_by('-publish_date') tags_sim = qs.filter(tag__in=tags).exclude(pk__in=exclude_pks)[:4] exclude_pks.update([x.pk for x in tags_sim]) themes_sim = qs.filter(theme__in=themes).exclude(pk__in=exclude_pks)[:4] diff --git a/templates/client/article/article.html b/templates/client/article/article.html index 61fdf3e1..1998de69 100644 --- a/templates/client/article/article.html +++ b/templates/client/article/article.html @@ -38,9 +38,9 @@
  • Раздел: {{ object.theme.all.0 }}
  • {# {{ object.publish_date|date:"d E Y" }} #} - {% if object.theme.all.exists %} + {% if object.tag.all.exists %}
    - {% trans 'Теги:' %}   {% include 'includes/article_tags.html' with obj=object %} + {% trans 'Теги:' %}   {% include 'client/includes/article_tags.html' with obj=object %}
    {% endif %}