diff --git a/article/models.py b/article/models.py index 5a0da916..aa252baf 100644 --- a/article/models.py +++ b/article/models.py @@ -123,7 +123,7 @@ class Article(TranslatableModel): files = generic.GenericRelation('file.FileModel', content_type_field='content_type', object_id_field='object_id') class Meta: - ordering = ['-created'] + ordering = ['-publish_date'] def __unicode__(self): return self.lazy_translation_getter('main_title', self.pk) diff --git a/templates/client/article/article.html b/templates/client/article/article.html index 71f5d860..e36596ee 100644 --- a/templates/client/article/article.html +++ b/templates/client/article/article.html @@ -19,7 +19,7 @@ {% include 'client/includes/article/article_logo.html' with obj=object %}

{{ object.main_title }}

- {{ object.created|date:"d E Y" }}{% if object.theme.all.exists %}{% include 'includes/article_theme.html' with obj=object %}{% endif %} + {{ object.publish_date|date:"d E Y" }}{% if object.theme.all.exists %}{% include 'includes/article_theme.html' with obj=object %}{% endif %} {% if request.user.is_admin %} {% trans 'изменить' %} {% endif %} diff --git a/templates/client/includes/article/blog_list.html b/templates/client/includes/article/blog_list.html index afd7969d..64b68bad 100644 --- a/templates/client/includes/article/blog_list.html +++ b/templates/client/includes/article/blog_list.html @@ -7,7 +7,7 @@ {% include 'includes/article/article_preview.html' with obj=blog %}

{{ blog.main_title }}

{{ blog.preview|safe }} - {{ blog.created|date:"d E Y" }}{% if blog.tag.all.exists %}{% include 'includes/article_tags.html' with obj=blog %}{% endif %} + {{ blog.publish_date|date:"d E Y" }}{% if blog.tag.all.exists %}{% include 'includes/article_tags.html' with obj=blog %}{% endif %} {% if forloop.counter == 5 or objects|length < 5 %}