diff --git a/fet2020/posts/views.py b/fet2020/posts/views.py index 9cb18f3d..6fc3e7ac 100644 --- a/fet2020/posts/views.py +++ b/fet2020/posts/views.py @@ -8,6 +8,7 @@ from django.contrib import messages from django.http import HttpResponse, Http404 from django.shortcuts import render from django.template.loader import render_to_string +from django.utils import timezone from authentications.decorators import authenticated_user from documents.api import get_pad_link @@ -62,8 +63,12 @@ def index(request): fet_meeting_only, ) else: - form = PostSearchForm() - posts = Post.objects.date_sorted_list(public_only) + data = { + 'year': timezone.now().year, + } + + form = PostSearchForm(data) + posts = Post.objects.date_filtered_list(public_only, data["year"]) if posts: taglist = map(lambda post: post.tags, posts)