defaults.py 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. 'misago.core',
  34. 'misago.conf',
  35. 'misago.views',
  36. )
  37. MIDDLEWARE_CLASSES = (
  38. 'django.contrib.sessions.middleware.SessionMiddleware',
  39. 'django.middleware.common.CommonMiddleware',
  40. 'django.middleware.csrf.CsrfViewMiddleware',
  41. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  42. 'django.contrib.messages.middleware.MessageMiddleware',
  43. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  44. 'misago.core.middleware.threadstore.ThreadStoreMiddleware',
  45. 'misago.core.middleware.exceptionhandler.ExceptionHandlerMiddleware',
  46. )
  47. # Register Misago directories
  48. LOCALE_PATHS = (
  49. os.path.join(MISAGO_BASE_DIR, 'locale'),
  50. )
  51. STATICFILES_DIRS = (
  52. os.path.join(MISAGO_BASE_DIR, 'static'),
  53. )
  54. TEMPLATE_DIRS = (
  55. os.path.join(MISAGO_BASE_DIR, 'templates'),
  56. )
  57. # Internationalization
  58. USE_I18N = True
  59. USE_L10N = True
  60. USE_TZ = True
  61. TIME_ZONE = 'UTC'