feat: Поддержка фильтрации на стороне Django
This commit is contained in:
@@ -28,7 +28,7 @@ DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
if DEBUG:
|
||||
ALLOWED_HOSTS = ["0.0.0.0"]
|
||||
ALLOWED_HOSTS = ["0.0.0.0", "localhost", "127.0.0.1"]
|
||||
|
||||
# Application definition
|
||||
|
||||
@@ -45,13 +45,7 @@ INSTALLED_APPS = [
|
||||
]
|
||||
|
||||
SWAGGER_SETTINGS = {
|
||||
'SECURITY_DEFINITIONS': {
|
||||
'Bearer': {
|
||||
'type': 'apiKey',
|
||||
'name': 'Authorization',
|
||||
'in': 'header'
|
||||
}
|
||||
}
|
||||
"SECURITY_DEFINITIONS": {"Bearer": {"type": "apiKey", "name": "Authorization", "in": "header"}}
|
||||
}
|
||||
|
||||
MIDDLEWARE = [
|
||||
@@ -130,7 +124,10 @@ SIMPLE_JWT = {
|
||||
}
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
"DEFAULT_AUTHENTICATION_CLASSES": ("rest_framework_simplejwt.authentication.JWTAuthentication",)
|
||||
"DEFAULT_AUTHENTICATION_CLASSES": (
|
||||
"rest_framework_simplejwt.authentication.JWTAuthentication",
|
||||
),
|
||||
"DEFAULT_FILTER_BACKENDS": ["django_filters.rest_framework.DjangoFilterBackend"],
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
djangorestframework==3.12.4
|
||||
django-filter==2.4.0
|
||||
markdown==3.3.4
|
||||
appdirs==1.4.4
|
||||
asgiref==3.3.4
|
||||
|
||||
Reference in New Issue
Block a user