Tri des articles par date de création décroissante dans le context_processor.

This commit is contained in:
mrtoine 2025-12-16 13:23:15 +01:00
parent 5fd06f5ae1
commit afa673ccd9

View file

@ -1,5 +1,5 @@
from .models import Post
def posts_list(request):
posts = Post.objects.all()
posts = Post.objects.all().order_by('-created_at')
return {'posts': posts}