Skip to content

Commit

Permalink
Fix pep8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault committed May 9, 2023
1 parent ebe5715 commit b346ccc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions envergo/pages/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion envergo/pages/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
NewsFeed(),
name="news_feed",
),

]
),
),
Expand Down
4 changes: 2 additions & 2 deletions envergo/pages/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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

0 comments on commit b346ccc

Please sign in to comment.