settings.py 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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. <<<<<<< HEAD
  16. # Enter every god admin using following pattern:
  17. =======
  18. # Enter every admin using following pattern:
  19. >>>>>>> master
  20. # ('John', 'john@example.com'),
  21. # Note trailing separator!
  22. ADMINS = ()
  23. # Secret key is used by Django and Misago in hashes generation
  24. # YOU MUST REPLACE IT with random combination of characters
  25. # NEVER EVER SHARE THIS KEY WITH ANYBODY!
  26. # Make it messed up and long, this is example of good secret key:
  27. # yaobeifl1a6hf&3)^uc#^vlu1ud7xp^+*c5zoq*tf)fvs#*o$#
  28. SECRET_KEY = 'secret-key'
  29. # Database connection
  30. DATABASES = {
  31. 'default': {
  32. 'ENGINE': 'django.db.backends.sqlite3', # Can be either 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
  33. 'NAME': 'database.db', # Name of the database or the path to the database file if using sqlite3.
  34. 'USER': '', # Not used with sqlite3.
  35. 'PASSWORD': '', # Not used with sqlite3.
  36. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
  37. 'PORT': '', # Set to empty string for default. Not used with sqlite3.
  38. }
  39. }
  40. # Cache engine
  41. # Misago is EXTREMELY data hungry
  42. # If you don't set any cache, it will BRUTALISE your database and memory
  43. # In production ALWAYS use cache
  44. # For reference read following document:
  45. # https://docs.djangoproject.com/en/dev/topics/cache/
  46. CACHES = {
  47. 'default': {
  48. 'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
  49. }
  50. }
  51. # Search engine
  52. # Misago relies on 3rd party search engines to index and search your forum content
  53. # Read following for information on configurating search:
  54. # http://django-haystack.readthedocs.org/en/latest/tutorial.html#modify-your-settings-py
  55. HAYSTACK_CONNECTIONS = {
  56. 'default': {
  57. 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', # Misago uses Whoosh by default
  58. 'PATH': 'searchindex',
  59. },
  60. }
  61. # Cookies configuration
  62. COOKIES_DOMAIN = '192.168.33.10' # E.g. a cookie domain for "www.mysite.com" or "forum.mysite.com" is ".mysite.com"
  63. COOKIES_PATH = '/'
  64. COOKIES_PREFIX = '' # Allows you to avoid cookies collisions with other applications.
  65. COOKIES_SECURE = False # Set this to true if, AND ONLY IF, you are using SSL on your forum.
  66. # Sessions configuration
  67. SESSION_LIFETIME = 3600 # Number of seconds since last request after which session is marked as expired.
  68. # Local time zone for this installation. Choices can be found here:
  69. # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
  70. # although not all choices may be available on all operating systems.
  71. # On Unix systems, a value of None will cause Django to use the same
  72. # timezone as the operating system.
  73. # If running in a Windows environment this must be set to the same as your
  74. # system time zone.
  75. TIME_ZONE = 'UTC'
  76. # Language code for this installation. All choices can be found here:
  77. # http://www.i18nguy.com/unicode/language-identifiers.html
  78. LANGUAGE_CODE = 'en_US'
  79. <<<<<<< HEAD
  80. # Absolute filesystem path to the directory that will hold publicly available media uploaded by users.
  81. =======
  82. # Absolute filesystem path to the directory that will hold user-uploaded files.
  83. >>>>>>> master
  84. # Always use forward slashes, even on Windows.
  85. # Example: "/home/media/media.lawrence.com/media/"
  86. MEDIA_ROOT = '/vagrant/media/'
  87. # URL that handles the media served from MEDIA_ROOT. Make sure to use a
  88. # trailing slash.
  89. # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
  90. MEDIA_URL = '/media/'
  91. <<<<<<< HEAD
  92. # Absolute filesystem path to the directory that will hold post attachments.
  93. # Always use forward slashes, even on Windows.
  94. # Example: "/home/media/media.lawrence.com/attachments/"
  95. ATTACHMENTS_ROOT = '/vagrant/attachments/'
  96. =======
  97. >>>>>>> master
  98. # Absolute path to the directory static files should be collected to.
  99. # Don't put anything in this directory yourself; store your static files
  100. # Always use forward slashes, even on Windows.
  101. # in apps' "static/" subdirectories and in STATICFILES_DIRS.
  102. # Example: "/home/media/media.lawrence.com/static/"
  103. STATIC_ROOT = ''
  104. # URL prefix for static files.
  105. # Example: "http://media.lawrence.com/static/"
  106. STATIC_URL = '/static/'
  107. # Additional locations of static files
  108. STATICFILES_DIRS = (
  109. # Put strings here, like "/home/html/static" or "C:/www/django/static".
  110. # Always use forward slashes, even on Windows.
  111. # Don't forget to use absolute paths, not relative paths.
  112. # Make sure directory containing avatars is located under first directory on list
  113. '/vagrant/static/',
  114. )
  115. # E-mail host
  116. EMAIL_HOST = ''
  117. # E-mail port
  118. EMAIL_PORT = 25
  119. # E-mail host user
  120. EMAIL_HOST_USER = ''
  121. # E-mail host password
  122. EMAIL_HOST_PASSWORD = ''
  123. # Use TLS encryption
  124. EMAIL_USE_TLS = False
  125. <<<<<<< HEAD
  126. # Screamer Configuration
  127. # Screamer is special feature that sends email to users listed under ADMINS when application
  128. # erros. First setting is origin of error emails, while second is message title prefix that
  129. # makes messages easier to spot in your inbox
  130. SERVER_EMAIL = 'root@localhost'
  131. EMAIL_SUBJECT_PREFIX = '[Misago Screamer]'
  132. =======
  133. # E-mail subject prefix added to emails for staff
  134. EMAIL_SUBJECT_PREFIX = '[Misago]'
  135. >>>>>>> master
  136. # Catch-all e-mail address
  137. # If DEBUG_MODE is on, all emails will be sent to this address instead of real recipient.
  138. CATCH_ALL_EMAIL_ADDRESS = ''
  139. # Directories with templates
  140. TEMPLATE_DIRS = (
  141. # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
  142. # Always use forward slashes, even on Windows.
  143. # Don't forget to use absolute paths, not relative paths.
  144. '/vagrant/templates'
  145. )
  146. # List of installed themes
  147. INSTALLED_THEMES = (
  148. 'cranefly', # Default style always first
  149. 'admin', # Admin theme always last
  150. )
  151. # Enable mobile subdomain for mobile stuff
  152. MOBILE_SUBDOMAIN = ''
  153. # Templates used by mobile version
  154. MOBILE_TEMPLATES = ''
  155. # Name of root urls configuration
  156. ROOT_URLCONF = 'deployment.urls'
  157. # Python dotted path to the WSGI application used by Django's runserver.
  158. WSGI_APPLICATION = 'deployment.wsgi.application'
  159. # Empty secret key if its known
  160. if SECRET_KEY == 'yaobeifl1a6hf&3)^uc#^vlu1ud7xp^+*c5zoq*tf)fvs#*o$#':
  161. SECRET_KEY = ''
  162. <<<<<<< HEAD
  163. # Disable Jinja2 for django debug toolbar templates
  164. if DEBUG:
  165. DEFAULT_JINJA2_TEMPLATE_INTERCEPT_RE = r"(?!debug_toolbar/).*"
  166. =======
  167. >>>>>>> master
  168. # Override config if we are in tests
  169. if 'test' in sys.argv:
  170. if not SECRET_KEY:
  171. SECRET_KEY = 'SECRET4TESTS'
  172. DATABASES['default'] = {'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'db4testing'}
  173. CACHES['default'] = {'BACKEND': 'django.core.cache.backends.dummy.DummyCache'}
  174. SKIP_SOUTH_TESTS = True
  175. MEDIA_URL = "http://media.domain.com/"
  176. HAYSTACK_CONNECTIONS = {'default': {'ENGINE': 'haystack.backends.simple_backend.SimpleEngine',},}