Schule als Staat Projekt Web, Dokumente, etc.
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

111 líneas
2.9KB

  1. """
  2. Django settings for sas_web project.
  3. Generated by 'django-admin startproject' using Django 1.8.7.
  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. # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  10. import os
  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.8/howto/deployment/checklist/
  14. # SECURITY WARNING: keep the secret key used in production secret!
  15. SECRET_KEY = 'dnwe1fairy&@7=qoe7(w0bahnt9(&%zn8bph5&-r$1*s2$d2@h'
  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. 'startpage',
  22. 'django.contrib.admin',
  23. 'django.contrib.auth',
  24. 'django.contrib.contenttypes',
  25. 'django.contrib.sessions',
  26. 'django.contrib.messages',
  27. 'django.contrib.staticfiles',
  28. )
  29. MIDDLEWARE_CLASSES = (
  30. 'django.contrib.sessions.middleware.SessionMiddleware',
  31. 'django.middleware.common.CommonMiddleware',
  32. 'django.middleware.csrf.CsrfViewMiddleware',
  33. 'django.contrib.auth.middleware.AuthenticationMiddleware',
  34. 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
  35. 'django.contrib.messages.middleware.MessageMiddleware',
  36. 'django.middleware.clickjacking.XFrameOptionsMiddleware',
  37. 'django.middleware.security.SecurityMiddleware',
  38. )
  39. ROOT_URLCONF = 'sas_web.urls'
  40. TEMPLATES = [
  41. {
  42. 'BACKEND': 'django.template.backends.django.DjangoTemplates',
  43. 'DIRS': [os.path.join(BASE_DIR, 'templates')],
  44. 'APP_DIRS': True,
  45. 'OPTIONS': {
  46. 'context_processors': [
  47. 'django.template.context_processors.debug',
  48. 'django.template.context_processors.request',
  49. 'django.contrib.auth.context_processors.auth',
  50. 'django.contrib.messages.context_processors.messages',
  51. ],
  52. },
  53. },
  54. ]
  55. WSGI_APPLICATION = 'sas_web.wsgi.application'
  56. # Database
  57. # https://docs.djangoproject.com/en/1.8/ref/settings/#databases
  58. DATABASES = {
  59. 'default': {
  60. 'ENGINE': 'django.db.backends.mysql',
  61. 'NAME': os.environ.get('SAS_DATABASE_NAME', 'sas_db'),
  62. 'OPTIONS': {
  63. 'read_default_file': os.environ.get('SAS_DATABASE_CONFIG',
  64. os.path.join(BASE_DIR, 'my.cnf'))
  65. }
  66. }
  67. }
  68. # Internationalization
  69. # https://docs.djangoproject.com/en/1.8/topics/i18n/
  70. LANGUAGE_CODE = 'en-us'
  71. TIME_ZONE = 'UTC'
  72. USE_I18N = True
  73. USE_L10N = True
  74. USE_TZ = True
  75. # Static files (CSS, JavaScript, Images)
  76. # https://docs.djangoproject.com/en/1.8/howto/static-files/
  77. STATIC_URL = '/static/'
  78. STATICFILES_DIRS = [
  79. os.path.join(BASE_DIR, "static")
  80. ]