|
@@ -15,7 +15,6 @@ from pathlib import Path
|
|
|
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
|
|
BASE_DIR = Path(__file__).resolve().parent.parent
|
|
|
|
|
|
-
|
|
|
# Quick-start development settings - unsuitable for production
|
|
|
# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/
|
|
|
|
|
@@ -27,7 +26,6 @@ DEBUG = False
|
|
|
|
|
|
ALLOWED_HOSTS = ['*']
|
|
|
|
|
|
-
|
|
|
# Application definition
|
|
|
|
|
|
INSTALLED_APPS = [
|
|
@@ -43,7 +41,9 @@ INSTALLED_APPS = [
|
|
|
]
|
|
|
|
|
|
REST_FRAMEWORK = {
|
|
|
- 'DEFAULT_FILTER_BACKENDS': ['django_filters.rest_framework.DjangoFilterBackend']
|
|
|
+ 'DEFAULT_FILTER_BACKENDS': ['django_filters.rest_framework.DjangoFilterBackend'],
|
|
|
+ # 关闭API调试界面
|
|
|
+ 'DEFAULT_RENDERER_CLASSES': ['rest_framework.renderers.JSONRenderer']
|
|
|
}
|
|
|
|
|
|
MIDDLEWARE = [
|
|
@@ -77,7 +77,6 @@ TEMPLATES = [
|
|
|
|
|
|
WSGI_APPLICATION = 'VSeesResourceWeb.wsgi.application'
|
|
|
|
|
|
-
|
|
|
# Database
|
|
|
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
|
|
|
|
|
@@ -118,7 +117,6 @@ AUTH_PASSWORD_VALIDATORS = [
|
|
|
},
|
|
|
]
|
|
|
|
|
|
-
|
|
|
# Internationalization
|
|
|
# https://docs.djangoproject.com/en/3.2/topics/i18n/
|
|
|
|
|
@@ -132,7 +130,6 @@ USE_L10N = True
|
|
|
|
|
|
USE_TZ = True
|
|
|
|
|
|
-
|
|
|
# Static files (CSS, JavaScript, Images)
|
|
|
# https://docs.djangoproject.com/en/3.2/howto/static-files/
|
|
|
|