Skip to content
Snippets Groups Projects
Commit 909928e3 authored by Jan David Mol's avatar Jan David Mol
Browse files

Task LSMR-102: Allow ordering and filtering in URLs by default

parent 8e659941
Branches
Tags
1 merge request!87Lsmr epic
......@@ -54,6 +54,7 @@ INSTALLED_APPS = [
'django_json_widget',
'jsoneditor',
'drf_yasg',
'django_filters',
]
MIDDLEWARE = [
......@@ -137,6 +138,14 @@ REST_FRAMEWORK = {
],
'PAGE_SIZE': 50,
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination'
'DEFAULT_FILTER_BACKENDS': (
# allows ?field=value filtering in URLs
# (fields allowed for filtering must be annotated in viewsets using filter_fields = ('field', ...))
'django_filters.rest_framework.DjangoFilterBackend',
# allows ?ordering=[-]field to order list results
'rest_framework.filters.OrderingFilter',
),
}
# LDAP
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment