defaults.py 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. # Assets Pipeline
  26. PIPELINE_CSS = {
  27. 'misago': {
  28. 'source_filenames': (
  29. 'misago/css/style.less',
  30. ),
  31. 'output_filename': 'misago.css',
  32. },
  33. }
  34. PIPELINE_JS = {
  35. 'misago': {
  36. 'source_filenames': (
  37. 'misago/js/jquery.js',
  38. 'misago/js/bootstrap.js',
  39. ),
  40. 'output_filename': 'misago.js',
  41. }
  42. }
  43. STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'
  44. PIPELINE_COMPILERS = (
  45. 'pipeline.compilers.less.LessCompiler',
  46. )
  47. PIPELINE_CSS_COMPRESSOR = 'pipeline.compressors.yuglify.YuglifyCompressor'
  48. PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.yuglify.YuglifyCompressor'
  49. # Application definition
  50. INSTALLED_APPS = (
  51. 'django.contrib.admin',
  52. 'django.contrib.auth',
  53. 'django.contrib.contenttypes',
  54. 'django.contrib.sessions',
  55. 'django.contrib.messages',
  56. 'django.contrib.staticfiles',
  57. 'debug_toolbar',
  58. 'south',
  59. 'pipeline',
  60. 'floppyforms',
  61. 'misago.core',
  62. 'misago.conf',
  63. )
  64. MIDDLEWARE_CLASSES = (
  65. 'django.contrib.sessions.middleware.SessionMiddleware',
  66. 'django.middleware.common.CommonMiddleware',
  67. 'django.middleware.csrf.CsrfViewMiddleware',
  68. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  69. 'django.contrib.messages.middleware.MessageMiddleware',
  70. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  71. 'misago.core.middleware.threadstore.ThreadStoreMiddleware',
  72. 'misago.core.middleware.exceptionhandler.ExceptionHandlerMiddleware',
  73. )
  74. TEMPLATE_CONTEXT_PROCESSORS = (
  75. 'django.contrib.auth.context_processors.auth',
  76. 'django.core.context_processors.debug',
  77. 'django.core.context_processors.i18n',
  78. 'django.core.context_processors.media',
  79. 'django.core.context_processors.static',
  80. 'django.core.context_processors.tz',
  81. 'django.contrib.messages.context_processors.messages',
  82. 'misago.core.context_processors.site_address',
  83. )
  84. # Register Misago directories
  85. LOCALE_PATHS = (
  86. os.path.join(MISAGO_BASE_DIR, 'locale'),
  87. )
  88. STATICFILES_DIRS = (
  89. os.path.join(MISAGO_BASE_DIR, 'static'),
  90. )
  91. TEMPLATE_DIRS = (
  92. os.path.join(MISAGO_BASE_DIR, 'templates'),
  93. )
  94. # Internationalization
  95. USE_I18N = True
  96. USE_L10N = True
  97. USE_TZ = True
  98. TIME_ZONE = 'UTC'
  99. # How many e-mails should be sent in single step.
  100. # This is used for conserving memory usage when mailing many users at same time
  101. MISAGO_MAILER_BATCH_SIZE = 20