|
| 1 | +from pathlib import Path |
| 2 | + |
| 3 | +BASE_DIR = Path(__file__).resolve(strict=True).parent |
| 4 | + |
| 5 | +SECRET_KEY = "so-secret-i-cant-believe-you-are-looking-at-this" |
| 6 | + |
| 7 | +USE_TZ = True |
| 8 | + |
| 9 | +DEBUG = True |
| 10 | + |
| 11 | +APPEND_SLASH = False |
| 12 | + |
| 13 | +SITE_ID = 1 |
| 14 | + |
| 15 | +ALLOWED_HOSTS = [ |
| 16 | + "example.com", |
| 17 | +] |
| 18 | + |
| 19 | +DATABASES = { |
| 20 | + "default": { |
| 21 | + "ENGINE": "django.db.backends.sqlite3", |
| 22 | + "NAME": BASE_DIR / "regex_redirects.db", |
| 23 | + } |
| 24 | +} |
| 25 | + |
| 26 | +INSTALLED_APPS = [ |
| 27 | + "django.contrib.contenttypes", |
| 28 | + "django.contrib.auth", |
| 29 | + "django.contrib.sessions", |
| 30 | + "django.contrib.sites", |
| 31 | + "django.contrib.messages", |
| 32 | + "django.contrib.admin", |
| 33 | + "regex_redirects", |
| 34 | + "testapp", |
| 35 | +] |
| 36 | + |
| 37 | +MIDDLEWARE = [ |
| 38 | + "django.middleware.security.SecurityMiddleware", |
| 39 | + "django.contrib.sessions.middleware.SessionMiddleware", |
| 40 | + "django.middleware.common.CommonMiddleware", |
| 41 | + "django.middleware.csrf.CsrfViewMiddleware", |
| 42 | + "django.contrib.auth.middleware.AuthenticationMiddleware", |
| 43 | + "django.contrib.messages.middleware.MessageMiddleware", |
| 44 | + "django.middleware.clickjacking.XFrameOptionsMiddleware", |
| 45 | + "regex_redirects.middleware.RedirectFallbackMiddleware", |
| 46 | +] |
| 47 | + |
| 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 | + |
| 64 | +ROOT_URLCONF = "testapp.urls" |
0 commit comments