aboutsummaryrefslogtreecommitdiff
path: root/apps/core
diff options
context:
space:
mode:
authorBobby <[email protected]>2024-12-15 17:39:07 -0500
committerBobby <[email protected]>2024-12-15 17:39:07 -0500
commit12c92bf4d74f3717b1eafe1737e671a2b8bda02e (patch)
tree3a8f0a2799e32a254c6f27514f586a0124ad7b2c /apps/core
parent9f9025fe2f70ac500c01473a9659e2ecd1d11774 (diff)
downloadthatcomputerscientist-12c92bf4d74f3717b1eafe1737e671a2b8bda02e.tar.xz
thatcomputerscientist-12c92bf4d74f3717b1eafe1737e671a2b8bda02e.zip
post list on homepage
Diffstat (limited to 'apps/core')
-rw-r--r--apps/core/views.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/core/views.py b/apps/core/views.py
index 880dd366..0e23722a 100644
--- a/apps/core/views.py
+++ b/apps/core/views.py
@@ -2,7 +2,7 @@ from django.shortcuts import render
from thatcomputerscientist.utils import i18npatterns
from apps.administration.models import Announcement
from internal.mal_wrapper import get_mal_recent_activity
-
+from internal.weblog_utilities import recent_weblogs
MAL_USERNAME = "crvs"
@@ -14,10 +14,9 @@ def home(request):
LANGUAGE_CODE = i18npatterns(request.LANGUAGE_CODE)
request.meta.update(META)
announcements = Announcement.objects.filter(is_public=True).order_by("-created_at")
- announcements = announcements if len(announcements) > 0 else None
- recent_mal_activity = get_mal_recent_activity(MAL_USERNAME)
context = {
"announcements": announcements,
- "recent_mal_activity": recent_mal_activity,
+ "recent_mal_activity": get_mal_recent_activity(MAL_USERNAME),
+ "recent_weblogs": recent_weblogs(lang=LANGUAGE_CODE),
}
return render(request, f"{LANGUAGE_CODE}/core/home.html", context)