diff --git a/envergo/pages/models.py b/envergo/pages/models.py index 1ae6ef3cb..4d4485b13 100644 --- a/envergo/pages/models.py +++ b/envergo/pages/models.py @@ -8,8 +8,8 @@ class NewsItem(models.Model): """A news item to be displayed on the FAQ page.""" - content_md = models.TextField(_('Content')) - content_html = models.TextField(_('Content HTML')) + content_md = models.TextField(_("Content")) + content_html = models.TextField(_("Content HTML")) created_at = models.DateTimeField(_("Date created"), default=timezone.now) class Meta: diff --git a/envergo/pages/urls.py b/envergo/pages/urls.py index d3354da52..b80fb871c 100644 --- a/envergo/pages/urls.py +++ b/envergo/pages/urls.py @@ -57,7 +57,6 @@ NewsFeed(), name="news_feed", ), - ] ), ), diff --git a/envergo/pages/views.py b/envergo/pages/views.py index a0192925a..efdcaec7e 100644 --- a/envergo/pages/views.py +++ b/envergo/pages/views.py @@ -82,7 +82,7 @@ class NewsFeed(Feed): description = "Les nouveautés du projet EnvErgo" def items(self): - return NewsItem.objects.order_by('-created_at')[:10] + return NewsItem.objects.order_by("-created_at")[:10] def item_title(self, item): return date_format(item.created_at, "DATE_FORMAT") @@ -91,6 +91,6 @@ def item_description(self, item): return mark_safe(item.content_html) def item_link(self, item): - base_url = reverse('faq_news') + base_url = reverse("faq_news") item_url = f"{base_url}#news-item-{item.id}" return item_url