mirror of
https://github.com/wahyd4/links.git
synced 2026-08-09 05:06:16 +10:00
Show latest 3 posts
This commit is contained in:
+2
-2
@@ -87,8 +87,8 @@ class LinkListView(ListView):
|
||||
for link in popular_links
|
||||
]
|
||||
|
||||
# Add latest 2 posts to the context (most recent first)
|
||||
context['latest_posts'] = Post.objects.all().order_by('-created_at')[:2]
|
||||
# Add latest 3 posts to the context (most recent first)
|
||||
context['latest_posts'] = Post.objects.all().order_by('-created_at')[:3]
|
||||
|
||||
# Add pinned mini apps with random colors
|
||||
mini_apps = [
|
||||
|
||||
Reference in New Issue
Block a user