/
settings.py
62 lines (55 loc) · 2.12 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
import sys
from cogwheels import BaseAppSettingsHelper, DeprecatedAppSetting
class TestAppSettingsHelper(BaseAppSettingsHelper):
COMPLEX_REPLACEMENT_GUIDANCE = (
"The new setting offers much greater flexibility, whilst also allowing developers to "
"change X without changing Z. Check out the version X.X release notes for further details: "
"https://your-django-project.readthedocs.io/en/latest/releases/X.X.html"
)
deprecations = (
DeprecatedAppSetting('DEPRECATED_SETTING', warning_category=DeprecationWarning),
DeprecatedAppSetting(
'RENAMED_SETTING_OLD',
renamed_to='RENAMED_SETTING_NEW',
warning_category=DeprecationWarning,
removing_in='1.7',
),
DeprecatedAppSetting(
'REPLACED_SETTING',
replaced_by='REPLACEMENT_SETTING',
additional_guidance=COMPLEX_REPLACEMENT_GUIDANCE,
warning_category=PendingDeprecationWarning,
removing_in='1.8',
),
DeprecatedAppSetting(
'REPLACED_MODEL_SETTING',
replaced_by='REPLACEMENT_MODEL_SETTING',
warning_category=PendingDeprecationWarning
),
DeprecatedAppSetting(
'REPLACED_MODULE_SETTING',
replaced_by='REPLACEMENT_MODULE_SETTING',
warning_category=PendingDeprecationWarning
),
DeprecatedAppSetting(
'REPLACED_OBJECT_SETTING',
replaced_by='REPLACEMENT_OBJECT_SETTING',
warning_category=PendingDeprecationWarning
),
DeprecatedAppSetting(
'REPLACED_SETTING_ONE',
replaced_by='REPLACES_MULTIPLE',
warning_category=DeprecationWarning,
),
DeprecatedAppSetting(
'REPLACED_SETTING_TWO',
replaced_by='REPLACES_MULTIPLE',
warning_category=DeprecationWarning,
),
DeprecatedAppSetting(
'REPLACED_SETTING_THREE',
replaced_by='REPLACES_MULTIPLE',
warning_category=DeprecationWarning,
),
)
sys.modules[__name__] = TestAppSettingsHelper()