语音识别应用
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.

148 lines
4.2 KiB

  1. """
  2. Django settings for Zhijian_Project_WebService project.
  3. Generated by 'django-admin startproject' using Django 1.8.
  4. For more information on this file, see
  5. https://docs.djangoproject.com/en/1.8/topics/settings/
  6. For the full list of settings and their values, see
  7. https://docs.djangoproject.com/en/1.8/ref/settings/
  8. """
  9. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  10. import os
  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.8/howto/deployment/checklist/
  14. # SECURITY WARNING: keep the secret key used in production secret!
  15. SECRET_KEY = '330r)_!^qhd7$!w4)$y@4=p2bd*vlxf%4z(bx-fx-1i3txagvz'
  16. # SECURITY WARNING: don't run with debug turned on in production!
  17. DEBUG = True
  18. ALLOWED_HOSTS = ['*']
  19. # Application definition
  20. INSTALLED_APPS = (
  21. 'django.contrib.admin',
  22. 'django.contrib.auth',
  23. 'django.contrib.contenttypes',
  24. 'django.contrib.sessions',
  25. 'django.contrib.messages',
  26. 'django.contrib.staticfiles',
  27. )
  28. MIDDLEWARE = [
  29. 'django.contrib.sessions.middleware.SessionMiddleware',
  30. 'django.middleware.common.CommonMiddleware',
  31. 'django.middleware.csrf.CsrfViewMiddleware',
  32. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  33. # 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
  34. 'django.contrib.messages.middleware.MessageMiddleware',
  35. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  36. 'django.middleware.security.SecurityMiddleware',
  37. ]
  38. ROOT_URLCONF = 'text_analysis.urls'
  39. TEMPLATES = [
  40. {
  41. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  42. 'DIRS': [],
  43. 'APP_DIRS': True,
  44. 'OPTIONS': {
  45. 'context_processors': [
  46. 'django.template.context_processors.debug',
  47. 'django.template.context_processors.request',
  48. 'django.contrib.auth.context_processors.auth',
  49. 'django.contrib.messages.context_processors.messages',
  50. ],
  51. },
  52. },
  53. ]
  54. WSGI_APPLICATION = 'text_analysis.wsgi.application'
  55. # Database
  56. # https://docs.djangoproject.com/en/1.8/ref/settings/#databases
  57. # DATABASES = {
  58. # 'default': {
  59. # 'ENGINE': 'django.db.backends.sqlite3',
  60. # 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
  61. # }
  62. # }
  63. # Internationalization
  64. # https://docs.djangoproject.com/en/1.8/topics/i18n/
  65. LANGUAGE_CODE = 'en-us'
  66. TIME_ZONE = 'Asia/Shanghai'
  67. USE_I18N = True
  68. USE_L10N = True
  69. USE_TZ = True
  70. # Static files (CSS, JavaScript, Images)
  71. # https://docs.djangoproject.com/en/1.8/howto/static-files/
  72. STATIC_URL = '/static/'
  73. # U_LOGFILE_SIZE = 1 * 1024 * 1024 # 单日志文件最大100M
  74. # U_LOGFILE_COUNT = 7 # 保留10个日志文件
  75. #
  76. # LOGGING = {
  77. # 'version': 1,
  78. # 'disable_existing_loggers': True, # 禁用所有已经存在的日志配置
  79. # 'filters': {
  80. # 'require_debug_false': {
  81. # '()': 'django.utils.log.RequireDebugFalse'
  82. # }
  83. # },
  84. # 'formatters': {
  85. # 'verbose': {
  86. # 'format': '[%(levelname)s %(asctime)s @ %(process)d] %(module)s %(process)d %(thread)d %(message)s'
  87. # },
  88. # 'simple': {
  89. # 'format': '%(levelname)s %(asctime)s @ %(process)d %(message)s'
  90. # },
  91. # 'complete': {
  92. # 'format': '[%(levelname)s %(asctime)s @ %(process)d] (%(pathname)s/%(funcName)s:%(lineno)d) - %(message)s'
  93. # },
  94. # 'online': {
  95. # 'format': '[%(levelname)s %(asctime)s @ %(process)d] - %(message)s'
  96. # }
  97. # },
  98. # 'handlers': {
  99. # 'text': {
  100. # 'level': 'DEBUG',
  101. # #'class': 'logging.handlers.RotatingFileHandler',
  102. # 'class': 'logging.handlers.TimedRotatingFileHandler',
  103. # 'when': 'H',
  104. # 'interval': 1,
  105. # 'backupCount': U_LOGFILE_COUNT,
  106. # 'formatter': 'complete',
  107. # 'filename': os.path.join(BASE_DIR, 'logs/resultNew.log').replace('\\', '/'),
  108. # }
  109. # },
  110. # 'loggers': {
  111. # 'text': {
  112. # 'handlers': ['text'],
  113. # 'level': 'DEBUG',
  114. # 'propagate': False,
  115. # }
  116. # }
  117. # }