mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-04 01:44:15 +00:00
display the date of next happening in NewsDetailView
This commit is contained in:
1 parent
796ef72fa1
commit
a5440e3166
3 files changed
+50
-7
No files matched your search
+3
-1
@@ -301,7 +301,9 @@ class NewsDetailView(CanViewMixin, DetailView):
|
||||
queryset = News.objects.select_related("club", "author", "moderator")
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
return super().get_context_data(**kwargs) | {"date": self.object.dates.first()}
|
||||
return super().get_context_data(**kwargs) | {
|
||||
"date": self.object.dates.filter(start_date__gt=now()).first()
|
||||
}
|
||||
|
||||
|
||||
class NewsFeed(Feed):
|
||||
|
||||
Reference in new issue
Block a user