settings.py 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. """
  2. Misago settings for {{ project_name }} project.
  3. For more information on this file, see
  4. https://docs.djangoproject.com/en/{{ docs_version }}/topics/settings/
  5. For the full list of settings and their values, see
  6. https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/
  7. """
  8. # Import Misago defaults for overriding
  9. from misago.conf.defaults import *
  10. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  11. import os
  12. BASE_DIR = os.path.dirname(os.path.dirname(__file__))
  13. # Quick-start development settings - unsuitable for production
  14. # See https://docs.djangoproject.com/en/{{ docs_version }}/howto/deployment/checklist/
  15. # SECURITY WARNING: don't run with debug turned on in production!
  16. DEBUG = True
  17. TEMPLATE_DEBUG = True
  18. ALLOWED_HOSTS = []
  19. # Database
  20. # https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#databases
  21. DATABASES = {
  22. 'default': {
  23. 'ENGINE': 'django.db.backends.sqlite3',
  24. 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
  25. }
  26. }
  27. # Cache
  28. # https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#caches
  29. CACHES = {
  30. 'default': {
  31. 'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
  32. }
  33. }
  34. # Site language
  35. # https://docs.djangoproject.com/en/{{ docs_version }}/topics/i18n/
  36. LANGUAGE_CODE = 'en-us'
  37. # Path used to access static files (CSS, JavaScript, Images)
  38. # https://docs.djangoproject.com/en/{{ docs_version }}/howto/static-files/
  39. STATIC_URL = '/static/'
  40. # Path used to access uploaded media (Avatars and Profile Backgrounds, ect.)
  41. # This is NOT path used to serve posts attachments.
  42. # https://docs.djangoproject.com/en/{{ docs_version }}/howto/static-files/
  43. MEDIA_URL = '/media/'
  44. # Automatically setup default paths to media and attachments directories
  45. STATIC_ROOT = os.path.join(BASE_DIR, 'static')
  46. MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
  47. ATTACHMENTS_ROOT = os.path.join(BASE_DIR, 'attachments')
  48. # Automatically setup default paths for static and template directories
  49. # You can use those directories to easily customize and add your own
  50. # assets and templates to your site
  51. STATICFILES_DIRS = (
  52. os.path.join(BASE_DIR, 'theme/static'),
  53. ) + STATICFILES_DIRS
  54. TEMPLATE_DIRS = (
  55. os.path.join(BASE_DIR, 'theme/templates'),
  56. ) + TEMPLATE_DIRS
  57. # SECURITY WARNING: keep the secret key used in production secret!
  58. SECRET_KEY = '{{ secret_key }}'
  59. # Application definition
  60. # Don't edit those settings unless you know what you are doing
  61. ROOT_URLCONF = '{{ project_name }}.urls'
  62. WSGI_APPLICATION = '{{ project_name }}.wsgi.application'