You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
2.6 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. """
  2. Django settings for hc project.
  3. Generated by 'django-admin startproject' using Django 1.8.2.
  4. For more information on this file, see
  5. https://docs.djangoproject.com/en/1.8/topics/settings/
  6. For the full list of settings and their values, see
  7. https://docs.djangoproject.com/en/1.8/ref/settings/
  8. """
  9. import os
  10. import warnings
  11. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  12. HOST = "localhost"
  13. SECRET_KEY = "---"
  14. DEBUG = True
  15. ALLOWED_HOSTS = []
  16. INSTALLED_APPS = (
  17. 'django.contrib.admin',
  18. 'django.contrib.auth',
  19. 'django.contrib.contenttypes',
  20. 'django.contrib.humanize',
  21. 'django.contrib.sessions',
  22. 'django.contrib.messages',
  23. 'django.contrib.staticfiles',
  24. 'hc.accounts',
  25. 'hc.api',
  26. 'hc.front'
  27. )
  28. MIDDLEWARE_CLASSES = (
  29. 'django.contrib.sessions.middleware.SessionMiddleware',
  30. 'django.middleware.common.CommonMiddleware',
  31. 'django.middleware.csrf.CsrfViewMiddleware',
  32. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  33. 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
  34. 'django.contrib.messages.middleware.MessageMiddleware',
  35. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  36. 'django.middleware.security.SecurityMiddleware',
  37. )
  38. ROOT_URLCONF = 'hc.urls'
  39. TEMPLATES = [
  40. {
  41. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  42. 'DIRS': [os.path.join(BASE_DIR, 'templates')],
  43. 'APP_DIRS': True,
  44. 'OPTIONS': {
  45. 'context_processors': [
  46. 'django.template.context_processors.debug',
  47. 'django.template.context_processors.request',
  48. 'django.contrib.auth.context_processors.auth',
  49. 'django.contrib.messages.context_processors.messages',
  50. ],
  51. },
  52. },
  53. ]
  54. WSGI_APPLICATION = 'hc.wsgi.application'
  55. DATABASES = {
  56. 'default': {
  57. 'ENGINE': 'django.db.backends.postgresql_psycopg2',
  58. 'NAME': 'hc',
  59. 'USER': 'postgres',
  60. 'TEST': {'CHARSET': 'UTF8'}
  61. }
  62. }
  63. LANGUAGE_CODE = 'en-us'
  64. TIME_ZONE = 'UTC'
  65. USE_I18N = True
  66. USE_L10N = True
  67. USE_TZ = True
  68. SITE_ROOT = "http://localhost:8000"
  69. STATIC_URL = '/static/'
  70. STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")]
  71. STATIC_ROOT = os.path.join(BASE_DIR, 'static-collected')
  72. # AWS
  73. EMAIL_BACKEND = 'django_ses_backend.SESBackend'
  74. AWS_SES_ACCESS_KEY_ID = "---"
  75. AWS_SES_SECRET_ACCESS_KEY = "---"
  76. AWS_SES_REGION_NAME = 'eu-west-1'
  77. AWS_SES_REGION_ENDPOINT = 'email.eu-west-1.amazonaws.com'
  78. try:
  79. from local_settings import *
  80. except ImportError as e:
  81. warnings.warn("local_settings.py not found, using defaults")