settings.py 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. import sys
  2. from misago.settings_base import *
  3. # Allow debug?
  4. DEBUG = True
  5. TEMPLATE_DEBUG = DEBUG
  6. # Board address
  7. BOARD_ADDRESS = 'http://somewhere.com'
  8. # Admin control panel path
  9. # Leave this setting empty or remove it to turn admin panel off.
  10. # Misago always asserts that it has correct admin path and fixes it
  11. # if neccessary. This means "/admincp////" becomes "admincp/" and
  12. # "administration" becomes "administration/"
  13. ADMIN_PATH = 'admincp'
  14. # System admins
  15. ADMINS = ()
  16. # Secret key is used by Django and Misago in hashes generation
  17. # YOU MUST REPLACE IT with random combination of characters
  18. # Make it messed up and long, this is example of good secret key:
  19. # JA*^Sd09as809!^*(DSA!K1m12o7ds8a791k1#@!829758!@@ii_*091)
  20. SECRET_KEY = 'CHANGE-ME!'
  21. # Database connection
  22. DATABASES = {
  23. 'default': {
  24. 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
  25. 'NAME': '', # Or path to database file if using sqlite3.
  26. 'USER': '', # Not used with sqlite3.
  27. 'PASSWORD': '', # Not used with sqlite3.
  28. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
  29. 'PORT': '', # Set to empty string for default. Not used with sqlite3.
  30. }
  31. }
  32. # Override DB if we are in tests
  33. if 'test' in sys.argv:
  34. DATABASES['default'] = {'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'db4testing'}
  35. SKIP_SOUTH_TESTS = True
  36. # Cache engine
  37. # Misago is EXTREMELY data hungry
  38. # If you don't set any cache, it will BRUTALISE your database and memory
  39. # In production ALWAYS use cache
  40. CACHES = {
  41. 'default': {
  42. 'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
  43. }
  44. }
  45. # Cookies configuration
  46. COOKIES_DOMAIN = '' # For example cookie domain for "www.mysite.com" or "forum.mysite.com" is ".mysite.com"
  47. COOKIES_PATH = ''
  48. COOKIES_PREFIX = '' # Allows you to avoid cookies collisions with other applications.
  49. COOKIES_SECURE = False # Set this to true if AND ONLY IF you are using SSL on your forum.
  50. # Sessions configuration
  51. SESSION_LIFETIME = 3600 # Number of seconds since last request after which session is marked as expired.
  52. # Local time zone for this installation. Choices can be found here:
  53. # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
  54. # although not all choices may be available on all operating systems.
  55. # On Unix systems, a value of None will cause Django to use the same
  56. # timezone as the operating system.
  57. # If running in a Windows environment this must be set to the same as your
  58. # system time zone.
  59. TIME_ZONE = 'UTC'
  60. # Language code for this installation. All choices can be found here:
  61. # http://www.i18nguy.com/unicode/language-identifiers.html
  62. LANGUAGE_CODE = 'en_US'
  63. # Absolute filesystem path to the directory that will hold user-uploaded files.
  64. # Always use forward slashes, even on Windows.
  65. # Example: "/home/media/media.lawrence.com/media/"
  66. MEDIA_ROOT = ''
  67. # URL that handles the media served from MEDIA_ROOT. Make sure to use a
  68. # trailing slash.
  69. # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
  70. MEDIA_URL = '/media/'
  71. # Absolute path to the directory static files should be collected to.
  72. # Don't put anything in this directory yourself; store your static files
  73. # Always use forward slashes, even on Windows.
  74. # in apps' "static/" subdirectories and in STATICFILES_DIRS.
  75. # Example: "/home/media/media.lawrence.com/static/"
  76. STATIC_ROOT = ''
  77. # URL prefix for static files.
  78. # Example: "http://media.lawrence.com/static/"
  79. STATIC_URL = '/static/'
  80. # Additional locations of static files
  81. STATICFILES_DIRS = (
  82. # Put strings here, like "/home/html/static" or "C:/www/django/static".
  83. # Always use forward slashes, even on Windows.
  84. # Don't forget to use absolute paths, not relative paths.
  85. # Make sure directory containing avatars is located under first directory on list
  86. '/static',
  87. )
  88. # E-mail host
  89. EMAIL_HOST = ''
  90. # E-mail port
  91. EMAIL_PORT = 25
  92. # E-mail host user
  93. EMAIL_HOST_USER = ''
  94. # E-mail host password
  95. EMAIL_HOST_PASSWORD = ''
  96. # Use TLS encryption
  97. EMAIL_USE_TLS = False
  98. # E-mail subject prefix added to emails for staff
  99. EMAIL_SUBJECT_PREFIX = '[Misago]'
  100. # Catch-all e-mail address
  101. # If DEBUG_MODE is on, all emails will be sent to this address instead of real recipient.
  102. CATCH_ALL_EMAIL_ADDRESS = ''
  103. # Directories with templates
  104. TEMPLATE_DIRS = (
  105. # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
  106. # Always use forward slashes, even on Windows.
  107. # Don't forget to use absolute paths, not relative paths.
  108. '/templates'
  109. )
  110. # List of installed themes
  111. INSTALLED_THEMES = (
  112. 'cranefly', # Default style always first
  113. 'admin', # Admin theme always last
  114. )
  115. # Make this unique, and don't share it with anybody.
  116. SECRET_KEY = ''
  117. # Python dotted path to the WSGI application used by Django's runserver.
  118. WSGI_APPLICATION = 'deployment.wsgi.application'