defaults.py 3.1 KB

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