prod.py 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. from .base import * # noqa
  2. # SECURITY WARNING: don't run with debug turned on in production!
  3. DEBUG = False
  4. # SECURITY WARNING: keep the secret key used in production secret!
  5. SECRET_KEY = "abn^vwh^_m31u=sxw)+7ztc^ov&rpi2zc=1o54&m0r+(0m5s*i"
  6. # Add your site's domain name(s) here.
  7. ALLOWED_HOSTS = ["localhost"]
  8. # To send email from the server, we recommend django_sendmail_backend
  9. # Or specify your own email backend such as an SMTP server.
  10. # https://docs.djangoproject.com/en/3.0/ref/settings/#email-backend
  11. EMAIL_BACKEND = "django_sendmail_backend.backends.EmailBackend"
  12. # Default email address used to send messages from the website.
  13. DEFAULT_FROM_EMAIL = "My Company Inc. <info@localhost>"
  14. # A list of people who get error notifications.
  15. ADMINS = [
  16. ("Administrator", "admin@localhost"),
  17. ]
  18. # A list in the same format as ADMINS that specifies who should get broken link
  19. # (404) notifications when BrokenLinkEmailsMiddleware is enabled.
  20. MANAGERS = ADMINS
  21. # Email address used to send error messages to ADMINS.
  22. SERVER_EMAIL = DEFAULT_FROM_EMAIL
  23. # DATABASES = {
  24. # 'default': {
  25. # 'ENGINE': 'django.db.backends.mysql',
  26. # 'HOST': 'localhost',
  27. # 'NAME': 'mysite',
  28. # 'USER': 'mysite',
  29. # 'PASSWORD': '',
  30. # # If using SSL to connect to a cloud mysql database, spedify the CA as so.
  31. # 'OPTIONS': { 'ssl': { 'ca': '/path/to/certificate-authority.pem' } },
  32. # }
  33. # }
  34. # Use template caching to speed up wagtail admin and front-end.
  35. # Requires reloading web server to pick up template changes.
  36. TEMPLATES = [
  37. {
  38. "BACKEND": "django.template.backends.django.DjangoTemplates",
  39. "OPTIONS": {
  40. "context_processors": [
  41. "django.template.context_processors.debug",
  42. "django.template.context_processors.request",
  43. "django.contrib.auth.context_processors.auth",
  44. "django.contrib.messages.context_processors.messages",
  45. "wagtail.contrib.settings.context_processors.settings",
  46. ],
  47. "loaders": [
  48. (
  49. "django.template.loaders.cached.Loader",
  50. [
  51. "django.template.loaders.filesystem.Loader",
  52. "django.template.loaders.app_directories.Loader",
  53. ],
  54. ),
  55. ],
  56. },
  57. },
  58. ]
  59. CACHES = {
  60. "default": {
  61. "BACKEND": "django.core.cache.backends.filebased.FileBasedCache",
  62. "LOCATION": os.path.join(BASE_DIR, "cache"), # noqa
  63. "KEY_PREFIX": "coderedcms",
  64. "TIMEOUT": 14400, # in seconds
  65. }
  66. }
  67. try:
  68. from .local_settings import * # noqa
  69. except ImportError:
  70. pass