prod.py 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. from .base import *
  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 = '{{ secret_key }}'
  6. # Add your site's domain name(s) here.
  7. ALLOWED_HOSTS = ['{{ domain }}']
  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/{{ docs_version }}/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 = '{{ sitename }} <info@{{ domain_nowww }}>'
  14. # A list of people who get error notifications.
  15. ADMINS = [
  16. ('Administrator', 'admin@{{ domain_nowww }}'),
  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': '{{ project_name }}',
  28. # 'USER': '{{ project_name }}',
  29. # 'PASSWORD': '',
  30. # }
  31. #}
  32. # Use template caching to speed up wagtail admin and front-end.
  33. # Requires reloading web server to pick up template changes.
  34. TEMPLATES = [
  35. {
  36. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  37. 'OPTIONS': {
  38. 'context_processors': [
  39. 'django.template.context_processors.debug',
  40. 'django.template.context_processors.request',
  41. 'django.contrib.auth.context_processors.auth',
  42. 'django.contrib.messages.context_processors.messages',
  43. 'wagtail.contrib.settings.context_processors.settings',
  44. ],
  45. 'loaders': [
  46. ('django.template.loaders.cached.Loader', [
  47. 'django.template.loaders.filesystem.Loader',
  48. 'django.template.loaders.app_directories.Loader',
  49. ]),
  50. ],
  51. },
  52. },
  53. ]
  54. CACHES = {
  55. 'default': {
  56. 'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
  57. 'LOCATION': os.path.join(BASE_DIR, 'cache'),
  58. 'KEY_PREFIX': 'wagtailcrx',
  59. 'TIMEOUT': 14400, # in seconds
  60. }
  61. }
  62. try:
  63. from .local_settings import *
  64. except ImportError:
  65. pass