settings.py 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. """
  2. Django settings for djadhere project.
  3. Generated by 'django-admin startproject' using Django 1.10.
  4. For more information on this file, see
  5. https://docs.djangoproject.com/en/1.10/topics/settings/
  6. For the full list of settings and their values, see
  7. https://docs.djangoproject.com/en/1.10/ref/settings/
  8. """
  9. import os
  10. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  11. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  12. # Quick-start development settings - unsuitable for production
  13. # See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/
  14. # SECURITY WARNING: keep the secret key used in production secret!
  15. SECRET_KEY = '*d4p%8@loemk$p=65sd=23e#1aw4fhbr8%cme$8o318g7in$t_'
  16. # SECURITY WARNING: don't run with debug turned on in production!
  17. DEBUG = True
  18. ALLOWED_HOSTS = []
  19. # Application definition
  20. INSTALLED_APPS = [
  21. 'accounts',
  22. 'adhesions',
  23. 'services',
  24. 'banking',
  25. 'djadhere',
  26. 'bootstrap3',
  27. 'django_select2',
  28. 'django.contrib.admin',
  29. 'django.contrib.auth',
  30. 'django.contrib.contenttypes',
  31. 'django.contrib.sessions',
  32. 'django.contrib.messages',
  33. 'django.contrib.staticfiles',
  34. ]
  35. MIDDLEWARE = [
  36. 'django.middleware.security.SecurityMiddleware',
  37. 'django.contrib.sessions.middleware.SessionMiddleware',
  38. 'django.middleware.common.CommonMiddleware',
  39. 'django.middleware.csrf.CsrfViewMiddleware',
  40. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  41. 'django.contrib.messages.middleware.MessageMiddleware',
  42. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  43. 'adhesions.middleware.CorporationMiddleware',
  44. ]
  45. ROOT_URLCONF = 'djadhere.urls'
  46. TEMPLATES = [
  47. {
  48. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  49. 'DIRS': [],
  50. 'APP_DIRS': True,
  51. 'OPTIONS': {
  52. 'context_processors': [
  53. 'django.template.context_processors.debug',
  54. 'django.template.context_processors.request',
  55. 'django.contrib.auth.context_processors.auth',
  56. 'django.contrib.messages.context_processors.messages',
  57. ],
  58. },
  59. },
  60. ]
  61. WSGI_APPLICATION = 'djadhere.wsgi.application'
  62. # Database
  63. # https://docs.djangoproject.com/en/1.10/ref/settings/#databases
  64. DATABASES = {
  65. 'default': {
  66. 'ENGINE': 'django.db.backends.sqlite3',
  67. 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
  68. }
  69. }
  70. # Password validation
  71. # https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
  72. AUTH_PASSWORD_VALIDATORS = [
  73. {
  74. 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
  75. },
  76. {
  77. 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
  78. },
  79. {
  80. 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
  81. },
  82. {
  83. 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
  84. },
  85. ]
  86. AUTHENTICATION_BACKENDS = [
  87. 'django.contrib.auth.backends.ModelBackend',
  88. 'accounts.backends.EmailBackend',
  89. 'adhesions.backends.AdhesionBackend',
  90. ]
  91. # Internationalization
  92. # https://docs.djangoproject.com/en/1.10/topics/i18n/
  93. LANGUAGE_CODE = 'fr-FR'
  94. TIME_ZONE = 'Europe/Paris'
  95. USE_I18N = True
  96. USE_L10N = True
  97. USE_TZ = True
  98. # Static files (CSS, JavaScript, Images)
  99. # https://docs.djangoproject.com/en/1.10/howto/static-files/
  100. STATIC_URL = '/static/'
  101. LOGOUT_REDIRECT_URL = 'adhesion-detail-user'
  102. BOOTSTRAP3 = {
  103. # The URL to the jQuery JavaScript file
  104. # If not set, "build-in" CDN is used (maxcdn)
  105. # 'jquery_url': '//code.jquery.com/jquery.min.js',
  106. # 'jquery_url': STATIC_URL + 'jquery/dist/jquery.js',
  107. # The Bootstrap base URL
  108. # If not set, "build-in" CDN is used (maxcdn)
  109. # 'base_url': '//netdna.bootstrapcdn.com/bootstrap/3.2.0/',
  110. # 'base_url': STATIC_URL + 'bootstrap/dist/',
  111. # The complete URL to the Bootstrap CSS file
  112. # (None means derive it from base_url)
  113. 'css_url': None,
  114. # The complete URL to the Bootstrap CSS file
  115. # (None means no theme)
  116. 'theme_url': None,
  117. # The complete URL to the Bootstrap JavaScript file
  118. # (None means derive it from base_url)
  119. 'javascript_url': None,
  120. }