|
| 1 | +# Copyright The OpenTelemetry Authors |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | +""" |
| 15 | +Django settings for instrumentation_example project. |
| 16 | +
|
| 17 | +Generated by "django-admin startproject" using Django 3.0.4. |
| 18 | +
|
| 19 | +For more information on this file, see |
| 20 | +https://docs.djangoproject.com/en/3.0/topics/settings/ |
| 21 | +
|
| 22 | +For the full list of settings and their values, see |
| 23 | +https://docs.djangoproject.com/en/3.0/ref/settings/ |
| 24 | +""" |
| 25 | + |
| 26 | +import os |
| 27 | + |
| 28 | +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) |
| 29 | +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
| 30 | + |
| 31 | + |
| 32 | +# Quick-start development settings - unsuitable for production |
| 33 | +# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/ |
| 34 | + |
| 35 | +# SECURITY WARNING: keep the secret key used in production secret! |
| 36 | +SECRET_KEY = "it%*!=l2(fcawu=!m-06n&#j(iq2j#%$fu6)myi*b9i5ojk+6+" |
| 37 | + |
| 38 | +# SECURITY WARNING: don"t run with debug turned on in production! |
| 39 | +DEBUG = True |
| 40 | + |
| 41 | +ALLOWED_HOSTS = [] |
| 42 | + |
| 43 | + |
| 44 | +# Application definition |
| 45 | + |
| 46 | +INSTALLED_APPS = [ |
| 47 | + "django.contrib.admin", |
| 48 | + "django.contrib.auth", |
| 49 | + "django.contrib.contenttypes", |
| 50 | + "django.contrib.sessions", |
| 51 | + "django.contrib.messages", |
| 52 | + "django.contrib.staticfiles", |
| 53 | +] |
| 54 | + |
| 55 | +MIDDLEWARE = [ |
| 56 | + "django.middleware.security.SecurityMiddleware", |
| 57 | + "django.contrib.sessions.middleware.SessionMiddleware", |
| 58 | + "django.middleware.common.CommonMiddleware", |
| 59 | + "django.middleware.csrf.CsrfViewMiddleware", |
| 60 | + "django.contrib.auth.middleware.AuthenticationMiddleware", |
| 61 | + "django.contrib.messages.middleware.MessageMiddleware", |
| 62 | + "django.middleware.clickjacking.XFrameOptionsMiddleware", |
| 63 | +] |
| 64 | + |
| 65 | +ROOT_URLCONF = "instrumentation_example.urls" |
| 66 | + |
| 67 | +TEMPLATES = [ |
| 68 | + { |
| 69 | + "BACKEND": "django.template.backends.django.DjangoTemplates", |
| 70 | + "DIRS": [], |
| 71 | + "APP_DIRS": True, |
| 72 | + "OPTIONS": { |
| 73 | + "context_processors": [ |
| 74 | + "django.template.context_processors.debug", |
| 75 | + "django.template.context_processors.request", |
| 76 | + "django.contrib.auth.context_processors.auth", |
| 77 | + "django.contrib.messages.context_processors.messages", |
| 78 | + ], |
| 79 | + }, |
| 80 | + }, |
| 81 | +] |
| 82 | + |
| 83 | +WSGI_APPLICATION = "instrumentation_example.wsgi.application" |
| 84 | + |
| 85 | + |
| 86 | +# Database |
| 87 | +# https://docs.djangoproject.com/en/3.0/ref/settings/#databases |
| 88 | + |
| 89 | +DATABASES = { |
| 90 | + "default": { |
| 91 | + "ENGINE": "django.db.backends.sqlite3", |
| 92 | + "NAME": os.path.join(BASE_DIR, "db.sqlite3"), |
| 93 | + } |
| 94 | +} |
| 95 | + |
| 96 | + |
| 97 | +# Password validation |
| 98 | +# https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators |
| 99 | + |
| 100 | +AUTH_PASSWORD_VALIDATORS = [ |
| 101 | + { |
| 102 | + "NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator", |
| 103 | + }, |
| 104 | + { |
| 105 | + "NAME": "django.contrib.auth.password_validation.MinimumLengthValidator", |
| 106 | + }, |
| 107 | + { |
| 108 | + "NAME": "django.contrib.auth.password_validation.CommonPasswordValidator", |
| 109 | + }, |
| 110 | + { |
| 111 | + "NAME": "django.contrib.auth.password_validation.NumericPasswordValidator", |
| 112 | + }, |
| 113 | +] |
| 114 | + |
| 115 | + |
| 116 | +# Internationalization |
| 117 | +# https://docs.djangoproject.com/en/3.0/topics/i18n/ |
| 118 | + |
| 119 | +LANGUAGE_CODE = "en-us" |
| 120 | + |
| 121 | +TIME_ZONE = "UTC" |
| 122 | + |
| 123 | +USE_I18N = True |
| 124 | + |
| 125 | +USE_L10N = True |
| 126 | + |
| 127 | +USE_TZ = True |
| 128 | + |
| 129 | + |
| 130 | +# Static files (CSS, JavaScript, Images) |
| 131 | +# https://docs.djangoproject.com/en/3.0/howto/static-files/ |
| 132 | + |
| 133 | +STATIC_URL = "/static/" |
0 commit comments