Repository navigation
Expand file tree
/
Copy pathtests.py
More file actions
54 lines (47 loc) · 1.54 KB
/
Copy pathtests.py
File metadata and controls
54 lines (47 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# ruff: noqa
import os
from .base import *
DEBUG = True
SECRET_KEY = "1185a082-7e72-449e-bf43-12d2da59222b" # Just for dev
MEETUP_KEY = "" # Put your own key here.
# See https://secure.meetup.com/meetup_api/key/
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
# Override Wagtail admin base URL for tests
WAGTAILADMIN_BASE_URL = "http://testserver"
# Use PostgreSQL if DATABASE_URL is set (for CI), otherwise use SQLite (for local tests)
if os.getenv("DATABASE_URL"):
DATABASES = {"default": dj_database_url.config(conn_max_age=500)}
else:
# SQLite (simplest install for local development)
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": join(PROJECT_ROOT, "db.sqlite3"),
}
}
LOGGING.update(
{
"loggers": {
"django": {
"handlers": ["console"],
"level": os.getenv("DJANGO_LOG_LEVEL", "ERROR"),
},
"pythonie": {
"handlers": ["console"],
"level": os.getenv("DJANGO_LOG_LEVEL", "ERROR"),
},
"meetups": {
"handlers": ["console"],
"level": os.getenv("DJANGO_LOG_LEVEL", "ERROR"),
},
"sponsors": {
"handlers": ["console"],
"level": os.getenv("DJANGO_LOG_LEVEL", "ERROR"),
},
"core": {
"handlers": ["console"],
"level": os.getenv("DJANGO_LOG_LEVEL", "ERROR"),
},
}
}
)