Fix API for organizers and events with a . in their slug

This commit is contained in:
Raphael Michel
2020-09-16 16:37:36 +02:00
parent ea5fc3df40
commit 22c6553a48
2 changed files with 2 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ class OrganizerViewSet(viewsets.ReadOnlyModelViewSet):
queryset = Organizer.objects.none()
lookup_field = 'slug'
lookup_url_kwarg = 'organizer'
lookup_value_regex = '[^/]+'
filter_backends = (filters.OrderingFilter,)
ordering = ('slug',)
ordering_fields = ('name', 'slug')