1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-12-09 21:27:47 +01:00

Update views.py

This commit is contained in:
alexismdr
2025-12-09 10:35:42 +01:00
parent 1176c8e9b8
commit 412ea7b609

View File

@@ -30,7 +30,7 @@ class ActivityViewSet(ReadProtectedModelViewSet):
The djangorestframework plugin will get all `Activity` objects, serialize it to JSON with the given serializer,
then render it on /api/activity/activity/
"""
queryset = Activity.objects.order_by('id')
queryset = Activity.objects.order_by('-date_start')
serializer_class = ActivitySerializer
filter_backends = [DjangoFilterBackend, RegexSafeSearchFilter]
filterset_fields = ['name', 'description', 'activity_type', 'location', 'creater', 'organizer', 'attendees_club',