settings_online.py 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # coding=utf-8
  2. from base import *
  3. # redis配置
  4. CACHES = {
  5. 'default': {
  6. 'BACKEND': 'django_redis.cache.RedisCache',
  7. 'LOCATION': 'redis://127.0.0.1:6379/0',
  8. "OPTIONS": {
  9. "CLIENT_CLASS": "django_redis.client.default.DefaultClient",
  10. },
  11. },
  12. }
  13. DATABASES = {
  14. 'default': {
  15. 'ENGINE': 'django.db.backends.mysql',
  16. 'NAME': 'workflow',
  17. 'USER': 'tedcaos',
  18. 'PASSWORD': 'tedcaos123!@#',
  19. 'HOST': '172.17.22.226',
  20. 'PORT': '3306',
  21. }
  22. }
  23. # 验证码字体库位置
  24. FONT_PATH = os.path.join(BASE_DIR, "../static/font", "consola.ttf")
  25. AUTHENTICATION_BACKENDS = [
  26. "account.cauth.AccountManage",
  27. ]
  28. # session 过期设置
  29. SESSION_COOKIE_AGE = 60 * 30
  30. SESSION_SAVE_EVERY_REQUEST = True
  31. SESSION_COOKIE_HTTPONLY = False
  32. LOGGING = {
  33. 'version': 1,
  34. 'disable_existing_loggers': False,
  35. 'formatters': {
  36. 'standard': {
  37. 'format': '%(asctime)s [%(name)s:%(lineno)d] [%(module)s:%(funcName)s] [%(levelname)s]- %(message)s'
  38. }
  39. },
  40. 'handlers': {
  41. 'console': {
  42. 'class': 'logging.StreamHandler',
  43. 'level': 'INFO',
  44. 'formatter': 'standard'
  45. },
  46. },
  47. 'loggers': {
  48. '': {
  49. 'handlers': ['console'],
  50. 'level': os.getenv('DJANGO_LOG_LEVEL', 'INFO'),
  51. }
  52. },
  53. }
  54. HOST = "http://caos.tederen.com"
  55. HOST = "http://fover.tederen.com"
  56. PROJECT_NAME = u"期刊小程序"