settings.py 4.6 KB

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