Debian Codegraph @

testing/settings.py

raw symbols SCIP
1 import os, sys
2 sys.path.insert(0, "..")
3
4 BASE_DIR = os.path.dirname(__file__)
5 DEBUG = False
6 TEMPLATE_DEBUG = False
7
8 ALLOWED_HOSTS = ["*"]
9
10 DATABASES = {
11 "default": {
12 "ENGINE": "django.db.backends.sqlite3",
13 "NAME": "foobar.db"
14 }
15 }
16 DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
17
18 MIDDLEWARE_CLASSES = [
19 # "django.middleware.csrf.CsrfViewMiddleware",
20 "django.middleware.common.CommonMiddleware",
21 "django.contrib.sessions.middleware.SessionMiddleware",
22 "django.contrib.auth.middleware.AuthenticationMiddleware",
23 "django.contrib.messages.middleware.MessageMiddleware",
24 ]
25
26 ROOT_URLCONF = "testapp.urls"
27
28 USE_I18N = True
29 USE_TZ = True
30 TIME_ZONE = "UTC"
31 LANGUAGE_CODE = "en"
32 ADMIN_MEDIA_PREFIX = "/static/admin/"
33 INTERNAL_IPS = ("127.0.0.1",)
34
35 STATIC_ROOT = os.path.join(BASE_DIR, "static")
36 STATIC_URL = "/static/"
37
38 SESSION_ENGINE = "django.contrib.sessions.backends.signed_cookies"
39 SESSION_EXPIRE_AT_BROWSER_CLOSE = True
40
41 STATICFILES_FINDERS = (
42 "django.contrib.staticfiles.finders.FileSystemFinder",
43 "django.contrib.staticfiles.finders.AppDirectoriesFinder",
44 )
45
46 # TEMPLATE_DIRS = ()
47
48 SECRET_KEY = "di!n($kqa3)nd%ikad#kcjpkd^uw*h%*kj=*pm7$vbo6ir7h=l"
49 INSTALLED_APPS = (
50 "django.contrib.auth",
51 "django.contrib.contenttypes",
52 "django.contrib.sessions",
53 "django.contrib.staticfiles",
54 "django.contrib.messages",
55 "django_jinja",
56 "testapp",
57 )
58
59 from django_jinja.builtins import DEFAULT_EXTENSIONS
60 JINJA2_MUTE_URLRESOLVE_EXCEPTIONS = True
61
62 TEMPLATES = [
63 {
64 "BACKEND": "django_jinja.jinja2.Jinja2",
65 "APP_DIRS": True,
66 "OPTIONS": {
67 "debug": True,
68 "context_processors": [
69 "django.contrib.auth.context_processors.auth",
70 "django.template.context_processors.debug",
71 "django.template.context_processors.i18n",
72 "django.template.context_processors.media",
73 "django.template.context_processors.static",
74 "django.template.context_processors.tz",
75 "django.contrib.messages.context_processors.messages",
76 ],
77 "constants": {
78 "foo": "bar",
79 },
80 "policies": {
81 "ext.i18n.trimmed": True,
82 },
83 "extensions": DEFAULT_EXTENSIONS + [
84 "django_jinja.builtins.extensions.DjangoExtraFiltersExtension",
85 ]
86 }
87 },
88 {
89 "BACKEND": "django.template.backends.django.DjangoTemplates",
90 "DIRS": [],
91 "APP_DIRS": True
92 }
93 ]
94
95 TEST_RUNNER = "django.test.runner.DiscoverRunner"
96
97
98 LOGGING = {
99 "version": 1,
100 "disable_existing_loggers": False,
101 "filters": {
102 "require_debug_false": {
103 "()": "django.utils.log.RequireDebugFalse"
104 }
105 },
106
107 "formatters": {
108 "simple": {
109 "format": "%(asctime)s: %(message)s",
110 }
111 },
112
113 "handlers": {
114 "console":{
115 "level":"DEBUG",
116 "class":"logging.StreamHandler",
117 "formatter": "simple"
118 },
119
120 },
121 "loggers": {
122 "django.request": {
123 "handlers": ["console"],
124 "level": "ERROR",
125 "propagate": True,
126 },
127 "arandomtable.custom": {
128 "handlers": ["console"],
129 "level": "DEBUG",
130 },
131
132 }
133 }