You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

153 lines
4.1 KiB

  1. """
  2. Django settings for ulb_manage project.
  3. Generated by 'django-admin startproject' using Django 1.11.5.
  4. For more information on this file, see
  5. https://docs.djangoproject.com/en/1.11/topics/settings/
  6. For the full list of settings and their values, see
  7. https://docs.djangoproject.com/en/1.11/ref/settings/
  8. """
  9. import os
  10. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  11. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  12. # Quick-start development settings - unsuitable for production
  13. # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
  14. # SECURITY WARNING: keep the secret key used in production secret!
  15. SECRET_KEY = '9*x_hm3r5-57uo(9ij17z23od_wushr4pszd)sy@c2*fikvc$-'
  16. # SECURITY WARNING: don't run with debug turned on in production!
  17. DEBUG = True
  18. ALLOWED_HOSTS = ['www.zhizhuchuxing.com', 'www.zhizhuchuxing.cn','127.0.0.1']
  19. # Application definition
  20. INSTALLED_APPS = [
  21. 'official',
  22. 'backend',
  23. 'django.contrib.admin',
  24. 'django.contrib.auth',
  25. 'django.contrib.contenttypes',
  26. 'django.contrib.sessions',
  27. 'django.contrib.messages',
  28. 'django.contrib.staticfiles',
  29. 'corsheaders',
  30. ]
  31. MIDDLEWARE = [
  32. 'corsheaders.middleware.CorsMiddleware',
  33. 'django.middleware.security.SecurityMiddleware',
  34. 'django.contrib.sessions.middleware.SessionMiddleware',
  35. 'django.middleware.common.CommonMiddleware',
  36. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  37. 'django.contrib.messages.middleware.MessageMiddleware',
  38. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  39. ]
  40. ROOT_URLCONF = 'ulb_manage.urls'
  41. TEMPLATES = [
  42. {
  43. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  44. 'DIRS': ['templates'],
  45. 'APP_DIRS': True,
  46. 'OPTIONS': {
  47. 'context_processors': [
  48. 'django.template.context_processors.debug',
  49. 'django.template.context_processors.request',
  50. 'django.contrib.auth.context_processors.auth',
  51. 'django.contrib.messages.context_processors.messages',
  52. ],
  53. },
  54. },
  55. ]
  56. WSGI_APPLICATION = 'ulb_manage.wsgi.application'
  57. # Database
  58. # https://docs.djangoproject.com/en/1.11/ref/settings/#databases
  59. DATABASES = {
  60. # 'default': {
  61. # 'ENGINE': 'django.db.backends.sqlite3',
  62. # 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
  63. # }
  64. # 'default': {
  65. # 'ENGINE': 'django.db.backends.mysql',
  66. # 'NAME': 'csdata',
  67. # 'USER': 'root',
  68. # 'PASSWORD': '111111',
  69. # 'HOST': '127.0.0.1',
  70. # 'PORT': '3306',
  71. # }
  72. 'default': {
  73. 'ENGINE': 'django.db.backends.mysql',
  74. 'NAME': 'fx',
  75. 'USER': 'spider',
  76. 'PASSWORD': 'PjGPWNUgOYe6i1Ef',
  77. 'HOST': '106.14.56.77',
  78. 'PORT': '3306',
  79. }
  80. }
  81. # Password validation
  82. # https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators
  83. AUTH_PASSWORD_VALIDATORS = [
  84. {
  85. 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  86. },
  87. {
  88. 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  89. },
  90. {
  91. 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  92. },
  93. {
  94. 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  95. },
  96. ]
  97. # Internationalization
  98. # https://docs.djangoproject.com/en/1.11/topics/i18n/
  99. LANGUAGE_CODE = 'en-us'
  100. TIME_ZONE = 'Asia/Shanghai'
  101. USE_I18N = True
  102. USE_L10N = True
  103. USE_TZ = False
  104. # Static files (CSS, JavaScript, Images)
  105. # https://docs.djangoproject.com/en/1.11/howto/static-files/
  106. STATIC_URL = '/web/'
  107. STATICFILES_DIRS = [
  108. ['official', os.path.join(BASE_DIR, 'officialWebsite/dist')],
  109. ['backend', os.path.join(BASE_DIR, 'backendWebsite/dist')],
  110. ['m', os.path.join(BASE_DIR, 'mWebsite/dist')]
  111. ]
  112. # 跨域增加忽略
  113. CORS_ALLOW_CREDENTIALS = True
  114. CORS_ORIGIN_ALLOW_ALL = True
  115. CORS_ORIGIN_WHITELIST = (
  116. '*'
  117. )
  118. CS1_HOST = "http://cs1.zhizhuchuxing.com"
  119. WX_HOST = "http://wx.zhizhuchuxing.com"
  120. FX_HOST = "http://fx.zhizhuchuxing.com"
  121. ADM_USER = 'newfx'
  122. ADM_USER_KEY = 'newfx_key'
  123. ADM_USER_ID = '581'
  124. ADM_SOURCE_ID = '1285'