Добавлено базовое API + finished #4 #17 #20

Merged
AlekseyLobanov merged 5 commits from feat_4.base_api into develop 2021-04-17 15:01:03 +03:00
2 changed files with 8 additions and 10 deletions
Showing only changes of commit 6352deda3c - Show all commits

View File

@@ -27,8 +27,8 @@ SECRET_KEY = "django-insecure-toz+*lt(ejm!l*)92w2ciqoh^1kz#a(abbpcn54-dbw(nxoy&7
DEBUG = True DEBUG = True
ALLOWED_HOSTS = [] ALLOWED_HOSTS = []
if DEBUG: if DEBUG:
ALLOWED_HOSTS = ["0.0.0.0"] ALLOWED_HOSTS = ["0.0.0.0", "localhost", "127.0.0.1"]
# Application definition # Application definition
@@ -45,13 +45,7 @@ INSTALLED_APPS = [
] ]
SWAGGER_SETTINGS = { SWAGGER_SETTINGS = {
'SECURITY_DEFINITIONS': { "SECURITY_DEFINITIONS": {"Bearer": {"type": "apiKey", "name": "Authorization", "in": "header"}}
'Bearer': {
'type': 'apiKey',
'name': 'Authorization',
'in': 'header'
}
}
} }
MIDDLEWARE = [ MIDDLEWARE = [
@@ -130,7 +124,10 @@ SIMPLE_JWT = {
} }
REST_FRAMEWORK = { 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"],
} }

View File

@@ -1,4 +1,5 @@
djangorestframework==3.12.4 djangorestframework==3.12.4
django-filter==2.4.0
markdown==3.3.4 markdown==3.3.4
appdirs==1.4.4 appdirs==1.4.4
asgiref==3.3.4 asgiref==3.3.4