|
@@ -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/4.2/howto/deployment/checklist/
|
|
|
|
|
@@ -27,7 +26,6 @@ DEBUG = False
|
|
|
|
|
|
ALLOWED_HOSTS = ['*'] # 修改后,表示任何域名都能访问。如果指定域名的话,在''里放入指定的域名即可
|
|
|
|
|
|
-
|
|
|
# Application definition
|
|
|
|
|
|
INSTALLED_APPS = [
|
|
@@ -74,7 +72,6 @@ TEMPLATES = [
|
|
|
|
|
|
WSGI_APPLICATION = 'system.wsgi.application'
|
|
|
|
|
|
-
|
|
|
# Database
|
|
|
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases
|
|
|
|
|
@@ -85,7 +82,6 @@ DATABASES = {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
# Password validation
|
|
|
# https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators
|
|
|
|
|
@@ -104,7 +100,6 @@ AUTH_PASSWORD_VALIDATORS = [
|
|
|
},
|
|
|
]
|
|
|
|
|
|
-
|
|
|
# Internationalization
|
|
|
# https://docs.djangoproject.com/en/4.2/topics/i18n/
|
|
|
|
|
@@ -118,7 +113,6 @@ USE_I18N = True
|
|
|
|
|
|
USE_TZ = True
|
|
|
|
|
|
-
|
|
|
# Static files (CSS, JavaScript, Images)
|
|
|
# https://docs.djangoproject.com/en/4.2/howto/static-files/
|
|
|
|
|
@@ -129,19 +123,17 @@ STATIC_URL = 'static/'
|
|
|
|
|
|
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
|
|
|
|
|
-
|
|
|
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
|
|
|
|
|
|
# 这个是设置静态文件夹目录的路径
|
|
|
STATICFILES_DIRS = (
|
|
|
- os.path.join(BASE_DIR, 'static'),
|
|
|
- os.path.join(BASE_DIR, 'avatars'),
|
|
|
+ os.path.join(BASE_DIR, 'avatars', 'static'),
|
|
|
)
|
|
|
|
|
|
UPLOAD_URL = '/upload/files'
|
|
|
|
|
|
UPLOAD_ROOT = '/opt/files'
|
|
|
-#UPLOAD_ROOT = 'E:\\opt\\IBE\\files'
|
|
|
+# UPLOAD_ROOT = 'E:\\opt\\IBE\\files'
|
|
|
|
|
|
DOMAIN = ''
|
|
|
|