forked from saleor/saleor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.py
68 lines (43 loc) · 1.53 KB
/
settings.py
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import re
from typing import List, Pattern, Union
from django.utils.functional import SimpleLazyObject
from saleor.settings import * # noqa
def lazy_re_compile(regex, flags=0):
"""Lazily compile a regex with flags."""
def _compile():
# Compile the regex if it was not passed pre-compiled.
if isinstance(regex, str):
return re.compile(regex, flags)
else:
assert not flags, "flags must be empty if regex is passed pre-compiled"
return regex
return SimpleLazyObject(_compile)
CELERY_TASK_ALWAYS_EAGER = True
SECRET_KEY = "NOTREALLY"
ALLOWED_CLIENT_HOSTS = ["www.example.com"]
DEFAULT_CURRENCY = "USD"
TIME_ZONE = "America/Chicago"
LANGUAGE_CODE = "en"
SEARCH_BACKEND = "saleor.search.backends.postgresql"
EMAIL_BACKEND = "django.core.mail.backends.locmem.EmailBackend"
RECAPTCHA_PUBLIC_KEY = ""
RECAPTCHA_PRIVATE_KEY = ""
VATLAYER_ACCESS_KEY = ""
if "sqlite" in DATABASES["default"]["ENGINE"]: # noqa
DATABASES["default"]["TEST"] = { # noqa
"SERIALIZE": False,
"NAME": ":memory:",
"MIRROR": None,
}
COUNTRIES_ONLY = None
MEDIA_ROOT = None
MAX_CHECKOUT_LINE_QUANTITY = 50
USE_JSON_CONTENT = False
AUTH_PASSWORD_VALIDATORS = []
PASSWORD_HASHERS = ["tests.dummy_password_hasher.DummyHasher"]
EXTENSIONS_MANAGER = "saleor.extensions.manager.ExtensionsManager"
PLUGINS = []
PATTERNS_IGNORED_IN_QUERY_CAPTURES: List[Union[Pattern, SimpleLazyObject]] = [
lazy_re_compile(r"^SET\s+")
]
INSTALLED_APPS.append("tests.api.pagination") # noqa: F405