123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- """
- Misago default settings
- This fille sets everything Misago needs to run.
- If you want to add custom app, middleware or path, please update setting vallue
- defined in this file instead of copying setting from here to your settings.py.
- Yes:
- #yourproject/settings.py
- INSTALLED_APPS += (
- 'myawesomeapp',
- )
- No:
- #yourproject/settings.py
- INSTALLED_APPS = (
- 'django.contrib.admin',
- 'django.contrib.auth',
- 'misago.core',
- 'misago.conf',
- ...
- 'myawesomeapp',
- )
- """
- # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
- import os
- MISAGO_BASE_DIR = os.path.dirname(os.path.dirname(__file__))
- # Assets Pipeline
- # See http://django-pipeline.readthedocs.org/en/latest/configuration.html
- PIPELINE_CSS = {
- 'misago': {
- 'source_filenames': (
- 'misago/css/style.less',
- ),
- 'output_filename': 'misago.css',
- },
- }
- PIPELINE_JS = {
- 'misago': {
- 'source_filenames': (
- 'misago/js/jquery.js',
- 'misago/js/bootstrap.js',
- ),
- 'output_filename': 'misago.js',
- }
- }
- STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'
- PIPELINE_COMPILERS = (
- 'pipeline.compilers.less.LessCompiler',
- )
- PIPELINE_CSS_COMPRESSOR = 'pipeline.compressors.yuglify.YuglifyCompressor'
- PIPELINE_JS_COMPRESSOR = 'pipeline.compressors.yuglify.YuglifyCompressor'
- # Application definition
- INSTALLED_APPS = (
- 'django.contrib.admin',
- 'django.contrib.auth',
- 'django.contrib.contenttypes',
- 'django.contrib.sessions',
- 'django.contrib.messages',
- 'django.contrib.staticfiles',
- 'debug_toolbar',
- 'south',
- 'pipeline',
- 'floppyforms',
- 'misago.core',
- 'misago.conf',
- )
- MIDDLEWARE_CLASSES = (
- 'django.contrib.sessions.middleware.SessionMiddleware',
- 'django.middleware.common.CommonMiddleware',
- 'django.middleware.csrf.CsrfViewMiddleware',
- 'django.contrib.auth.middleware.AuthenticationMiddleware',
- 'django.contrib.messages.middleware.MessageMiddleware',
- 'django.middleware.clickjacking.XFrameOptionsMiddleware',
- 'misago.core.middleware.threadstore.ThreadStoreMiddleware',
- 'misago.core.middleware.exceptionhandler.ExceptionHandlerMiddleware',
- )
- TEMPLATE_CONTEXT_PROCESSORS = (
- 'django.contrib.auth.context_processors.auth',
- 'django.core.context_processors.debug',
- 'django.core.context_processors.i18n',
- 'django.core.context_processors.media',
- 'django.core.context_processors.static',
- 'django.core.context_processors.tz',
- 'django.contrib.messages.context_processors.messages',
- 'misago.core.context_processors.site_address',
- 'misago.conf.context_processors.settings',
- )
- # Register Misago directories
- LOCALE_PATHS = (
- os.path.join(MISAGO_BASE_DIR, 'locale'),
- )
- STATICFILES_DIRS = (
- os.path.join(MISAGO_BASE_DIR, 'static'),
- )
- TEMPLATE_DIRS = (
- os.path.join(MISAGO_BASE_DIR, 'templates'),
- )
- # Internationalization
- USE_I18N = True
- USE_L10N = True
- USE_TZ = True
- TIME_ZONE = 'UTC'
- # How many e-mails should be sent in single step.
- # This is used for conserving memory usage when mailing many users at same time
- MISAGO_MAILER_BATCH_SIZE = 20
|