defaults.py 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. """
  2. Misago default settings
  3. This fille sets everything Misago needs to run.
  4. If you want to add custom app, middleware or path, please update setting vallue
  5. defined in this file instead of copying setting from here to your settings.py.
  6. Yes:
  7. #yourproject/settings.py
  8. INSTALLED_APPS += (
  9. 'myawesomeapp',
  10. )
  11. No:
  12. #yourproject/settings.py
  13. INSTALLED_APPS = (
  14. 'django.contrib.admin',
  15. 'django.contrib.auth',
  16. 'misago.core',
  17. 'misago.conf',
  18. ...
  19. 'myawesomeapp',
  20. )
  21. """
  22. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  23. import os
  24. MISAGO_BASE_DIR = os.path.dirname(os.path.dirname(__file__))
  25. # Application definition
  26. INSTALLED_APPS = (
  27. 'django.contrib.admin',
  28. 'django.contrib.auth',
  29. 'django.contrib.contenttypes',
  30. 'django.contrib.sessions',
  31. 'django.contrib.messages',
  32. 'django.contrib.staticfiles',
  33. 'debug_toolbar',
  34. 'floppyforms',
  35. 'misago.core',
  36. 'misago.conf',
  37. )
  38. MIDDLEWARE_CLASSES = (
  39. 'django.contrib.sessions.middleware.SessionMiddleware',
  40. 'django.middleware.common.CommonMiddleware',
  41. 'django.middleware.csrf.CsrfViewMiddleware',
  42. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  43. 'django.contrib.messages.middleware.MessageMiddleware',
  44. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  45. 'misago.core.middleware.threadstore.ThreadStoreMiddleware',
  46. 'misago.core.middleware.exceptionhandler.ExceptionHandlerMiddleware',
  47. )
  48. TEMPLATE_CONTEXT_PROCESSORS = (
  49. 'django.contrib.auth.context_processors.auth',
  50. 'django.core.context_processors.debug',
  51. 'django.core.context_processors.i18n',
  52. 'django.core.context_processors.media',
  53. 'django.core.context_processors.static',
  54. 'django.core.context_processors.tz',
  55. 'django.contrib.messages.context_processors.messages',
  56. 'misago.core.context_processors.site_address',
  57. )
  58. # Register Misago directories
  59. LOCALE_PATHS = (
  60. os.path.join(MISAGO_BASE_DIR, 'locale'),
  61. )
  62. STATICFILES_DIRS = (
  63. os.path.join(MISAGO_BASE_DIR, 'static'),
  64. )
  65. TEMPLATE_DIRS = (
  66. os.path.join(MISAGO_BASE_DIR, 'templates'),
  67. )
  68. # Internationalization
  69. USE_I18N = True
  70. USE_L10N = True
  71. USE_TZ = True
  72. TIME_ZONE = 'UTC'
  73. # How many e-mails should be sent in single step.
  74. # This is used for conserving memory usage when mailing many users at same time
  75. MISAGO_MAILER_BATCH_SIZE = 20