mirror of
https://github.com/MOIS3Y/logs-collector.git
synced 2025-09-13 13:13:01 +02:00
Add: simple filters to modelviewsets
This commit is contained in:
@@ -35,6 +35,7 @@ INSTALLED_APPS = [
|
||||
'django.contrib.staticfiles',
|
||||
'collector.apps.CollectorConfig', # main app
|
||||
'rest_framework',
|
||||
'django_filters',
|
||||
"crispy_forms",
|
||||
"crispy_bootstrap5",
|
||||
'django_cleanup.apps.CleanupConfig', # required bottom
|
||||
@@ -147,6 +148,7 @@ REST_FRAMEWORK = {
|
||||
'rest_framework.renderers.BrowsableAPIRenderer',
|
||||
'rest_framework.parsers.MultiPartParser'
|
||||
],
|
||||
'DEFAULT_FILTER_BACKENDS': ['django_filters.rest_framework.DjangoFilterBackend', ], # noqa:E501
|
||||
# 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination', # noqa:E501
|
||||
# 'PAGE_SIZE': 3,
|
||||
}
|
||||
|
Reference in New Issue
Block a user