설명 없음

settings.py.default 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. """
  2. Django settings for seum project.
  3. Generated by 'django-admin startproject' using Django 1.9.4.
  4. For more information on this file, see
  5. https://docs.djangoproject.com/en/1.9/topics/settings/
  6. For the full list of settings and their values, see
  7. https://docs.djangoproject.com/en/1.9/ref/settings/
  8. """
  9. import os
  10. from django.core.urlresolvers import reverse_lazy
  11. from django.utils.translation import ugettext_lazy as _
  12. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  13. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  14. STATIC_ROOT = os.path.join(BASE_DIR, "static/")
  15. # Quick-start development settings - unsuitable for production
  16. # See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
  17. # SECURITY WARNING: keep the secret key used in production secret!
  18. SECRET_KEY = '(#lovv#uky9unr9azzqy14gktpf0(d&+cp@++l95*y4e%m%_ex'
  19. # SECURITY WARNING: don't run with debug turned on in production!
  20. DEBUG = True
  21. # Application definition
  22. INSTALLED_APPS = [
  23. 'babel',
  24. 'graphos',
  25. 'bootstrap3',
  26. 'django.contrib.admin',
  27. 'django.contrib.auth',
  28. 'django.contrib.contenttypes',
  29. 'django.contrib.sessions',
  30. 'django.contrib.messages',
  31. 'django.contrib.staticfiles',
  32. 'django_extensions',
  33. 'counter',
  34. 'bot'
  35. ]
  36. MIDDLEWARE_CLASSES = [
  37. 'django.middleware.security.SecurityMiddleware',
  38. 'django.contrib.sessions.middleware.SessionMiddleware',
  39. 'django.middleware.locale.LocaleMiddleware',
  40. 'django.middleware.common.CommonMiddleware',
  41. 'django.middleware.csrf.CsrfViewMiddleware',
  42. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  43. 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
  44. 'django.contrib.messages.middleware.MessageMiddleware',
  45. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  46. ]
  47. ROOT_URLCONF = 'seum.urls'
  48. TEMPLATES = [
  49. {
  50. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  51. 'DIRS': [],
  52. 'APP_DIRS': True,
  53. 'OPTIONS': {
  54. 'context_processors': [
  55. 'django.template.context_processors.debug',
  56. 'django.template.context_processors.request',
  57. 'django.contrib.auth.context_processors.auth',
  58. 'django.contrib.messages.context_processors.messages',
  59. ],
  60. },
  61. },
  62. ]
  63. WSGI_APPLICATION = 'seum.wsgi.application'
  64. # Database
  65. # https://docs.djangoproject.com/en/1.9/ref/settings/#databases
  66. DATABASES = {
  67. 'default': {
  68. 'ENGINE': 'django.db.backends.sqlite3',
  69. 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
  70. }
  71. }
  72. # Internationalization
  73. # https://docs.djangoproject.com/en/1.9/topics/i18n/
  74. LANGUAGE_CODE = 'en'
  75. TIME_ZONE = 'UTC'
  76. USE_I18N = True
  77. USE_L10N = True
  78. USE_TZ = True
  79. LANGUAGES = [
  80. ('en', _('English')),
  81. ('fr', _('French')),
  82. ]
  83. LOCALE_PATHS = [
  84. os.path.join(BASE_DIR, 'locale'),
  85. ]
  86. # Static files (CSS, JavaScript, Images)
  87. # https://docs.djangoproject.com/en/1.9/howto/static-files/
  88. STATIC_URL = '/static/'
  89. #Emailing
  90. EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
  91. EMAIL_HOST = 'localhost'
  92. EMAIL_PORT = 25
  93. EMAIL_HOST_USER = ''
  94. EMAIL_HOST_PASSWORD = ''
  95. EMAIL_USE_TLS = False
  96. DEFAULT_FROM_EMAIL = 'SeumMan <seum@merigoux.ovh>'
  97. # Telegram Bot
  98. # BOT_TELEGRAM_KEY = 'telegram-bot-key'
  99. # BOT_TELEGRAM_ID = 1234
  100. # BOT_TELEGRAM_NAME = 'telegramBot'
  101. #Production settings
  102. SECURE_CONTENT_TYPE_NOSNIFF = True
  103. SECURE_BROWSER_XSS_FILTER = True
  104. SECURE_SSL_REDIRECT = True
  105. SESSION_COOKIE_SECURE = True
  106. CSRF_COOKIE_SECURE = True
  107. CSRF_COOKIE_HTTPONLY = True
  108. X_FRAME_OPTIONS = 'DENY'
  109. ALLOWED_HOSTS = ['seum.merigoux.ovh']
  110. #login
  111. LOGIN_URL = reverse_lazy('login')
  112. LOGIN_REDIRECT_URL = reverse_lazy('home')
  113. # Bot
  114. BOT_TELEGRAM_KEY =
  115. BOT_TELEGRAM_ID =
  116. BOT_TELEGRAM_NAME =