text: """
  Django settings for select_class project.
  
  Generated by 'django-manage startproject' using Django 3.0.3.
  
  For more information on this file, see
  https://docs.djangoproject.com/en/3.0/topics/settings/
  
  For the full list of settings and their values, see
  https://docs.djangoproject.com/en/3.0/ref/settings/
  """
  
  import os
  
  # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  import django as django
  from django.template.backends import django
  
  BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  
  # Quick-start development settings - unsuitable for production
  # See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
  
  # SECURITY WARNING: keep the secret key used in production secret!
  SECRET_KEY = 'w+tb#w2v5xzf4ps==28d005f0htnu$q-2b440g2!mhky%6j$+f'
  
  # SECURITY WARNING: don't run with debug turned on in production!
  DEBUG = True
  
  ALLOWED_HOSTS = ['*']
  
  # Application definition
  
  # module = django.core.handlers.wsgi:WSGIHandler()
  
  INSTALLED_APPS = [
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      'manage',
      'front',
  ]
  
  MIDDLEWARE = [
      'django.middleware.security.SecurityMiddleware',
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.middleware.common.CommonMiddleware',
      # 'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware',
      'manage.middleware.LoginMiddleware',
      'front.middleware.FrontLoginMiddleware',
  ]
  
  ROOT_URLCONF = 'select_class.urls'
  
  TEMPLATES = [
      {
          'BACKEND': 'django.template.backends.django.DjangoTemplates',
          'DIRS': [os.path.join(BASE_DIR, 'templates')],
          'APP_DIRS': True,
          'OPTIONS': {
              'context_processors': [
                  'django.template.context_processors.debug',
                  'django.template.context_processors.request',
                  'django.contrib.auth.context_processors.auth',
                  'django.contrib.messages.context_processors.messages',
                  'django.template.context_processors.static'
              ],
          },
      },
  ]
  
  WSGI_APPLICATION = 'select_class.wsgi.application'
  
  # Database
  # https://docs.djangoproject.com/en/3.0/ref/settings/#databases
  
  DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.mysql',  # 或者使用 mysql.connector.django
          'NAME': 'select_class',
          'USER': 'root',
          'PASSWORD': 'root',
          'HOST': '134.175.49.155',
          'PORT': '3306',
      }
  }
  
  # Password validation
  # https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators
  
  AUTH_PASSWORD_VALIDATORS = [
      {
          'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
      },
      {
          'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
      },
      {
          'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
      },
      {
          'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
      },
  ]
  
  # Internationalization
  # https://docs.djangoproject.com/en/3.0/topics/i18n/
  
  LANGUAGE_CODE = 'en-us'
  
  TIME_ZONE = 'UTC'
  
  USE_I18N = True
  
  USE_L10N = True
  
  USE_TZ = True
  
  # Static files (CSS, JavaScript, Images)
  # https://docs.djangoproject.com/en/3.0/howto/static-files/
  
  # STATIC_URL = '/static/'
  STATIC_URL = '/static/'
  
  # 当运行 python manage.py collectstatic 的时候
  # STATIC_ROOT 文件夹 是用来将所有STATICFILES_DIRS中所有文件夹中的文件，以及各app中static中的文件都复制过来
  # 把这些文件放到一起是为了用apache等部署的时候更方便
  # STATIC_ROOT = os.path.join(BASE_DIR, 'collected_static')
  
  # 其它 存放静态文件的文件夹，可以用来存放项目中公用的静态文件，里面不能包含 STATIC_ROOT
  # 如果不想用 STATICFILES_DIRS 可以不用，都放在 app 里的 static 中也可以
  # STATICFILES_DIRS = (
  #     os.path.join(BASE_DIR, "common_static"),
  #     'D:\python_cod\tigerkin\tigerkin\templates\select_class',  # 用不到的时候可以不写这一行
  # )
  HERE = os.path.dirname(os.path.abspath(__file__))
  HERE = os.path.join(HERE, '../')
  
  STATICFILES_DIRS = (
      # Put strings here, like "/home/html/static" or "C:/www/django/static".
      # Always use forward slashes, even on Windows.
      # Don't forget to use absolute paths, not relative paths.
      os.path.join(HERE, 'static/'),
      'D:\python_cod\tigerkin\tigerkin\templates\select_class',
  )
  
  
  
  # 这个是默认设置，Django 默认会在 STATICFILES_DIRS中的文件夹 和 各app下的static文件夹中找文件
  # 注意有先后顺序，找到了就不再继续找了
  STATICFILES_FINDERS = (
      "django.contrib.staticfiles.finders.FileSystemFinder",
      "django.contrib.staticfiles.finders.AppDirectoriesFinder"
  )
  
  # 解决JSON序列化问题
  SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
  