|
|
|
|
@ -9,7 +9,7 @@ https://docs.djangoproject.com/en/3.2/topics/settings/
|
|
|
|
|
For the full list of settings and their values, see
|
|
|
|
|
https://docs.djangoproject.com/en/3.2/ref/settings/
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
|
|
|
|
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
|
|
|
|
@ -23,9 +23,9 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
|
|
|
|
SECRET_KEY = 'django-insecure-e&g+zu7l)zckobld^=ba^yz+tu10-tmuig6b&iaj@_b7)z9isg'
|
|
|
|
|
|
|
|
|
|
# SECURITY WARNING: don't run with debug turned on in production!
|
|
|
|
|
DEBUG = True
|
|
|
|
|
DEBUG = False
|
|
|
|
|
|
|
|
|
|
ALLOWED_HOSTS = []
|
|
|
|
|
ALLOWED_HOSTS = ['*']
|
|
|
|
|
|
|
|
|
|
DATA_UPLOAD_MAX_MEMORY_SIZE = 10485760 # 设置为最大10M
|
|
|
|
|
|
|
|
|
|
@ -38,8 +38,6 @@ INSTALLED_APPS = [
|
|
|
|
|
'django.contrib.sessions',
|
|
|
|
|
'django.contrib.messages',
|
|
|
|
|
'django.contrib.staticfiles',
|
|
|
|
|
'actionDrive.apps.ActiondriveConfig',
|
|
|
|
|
'ageTransfer.apps.AgetransferConfig',
|
|
|
|
|
'basicFunction.apps.BasicfunctionConfig',
|
|
|
|
|
'styleTransfer.apps.StyletransferConfig',
|
|
|
|
|
]
|
|
|
|
|
@ -128,3 +126,21 @@ STATIC_URL = '/static/'
|
|
|
|
|
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
|
|
|
|
|
|
|
|
|
|
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
|
|
|
|
|
|
|
|
|
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
|
|
|
|
|
|
|
|
|
|
CORS_ALLOW_CREDENTIALS = True
|
|
|
|
|
CORS_ORIGIN_ALLOW_ALL = True
|
|
|
|
|
CORS_ORIGIN_WHITELIST = ('http://*.*.*.*:*', 'http://skyemperor.top:*', 'http://localhost', 'http://127.0.0.1')
|
|
|
|
|
|
|
|
|
|
CORS_ALLOW_METHODS = (
|
|
|
|
|
'DELETE',
|
|
|
|
|
'GET',
|
|
|
|
|
'OPTIONS',
|
|
|
|
|
'PATCH',
|
|
|
|
|
'POST',
|
|
|
|
|
'PUT',
|
|
|
|
|
'VIEW',
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
CORS_ALLOW_HEADERS = ('*',)
|