plain 0.27.0__py3-none-any.whl → 0.28.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- plain/runtime/__init__.py +15 -0
- plain/runtime/user_settings.py +0 -13
- {plain-0.27.0.dist-info → plain-0.28.0.dist-info}/METADATA +1 -1
- {plain-0.27.0.dist-info → plain-0.28.0.dist-info}/RECORD +7 -7
- {plain-0.27.0.dist-info → plain-0.28.0.dist-info}/WHEEL +0 -0
- {plain-0.27.0.dist-info → plain-0.28.0.dist-info}/entry_points.txt +0 -0
- {plain-0.27.0.dist-info → plain-0.28.0.dist-info}/licenses/LICENSE +0 -0
plain/runtime/__init__.py
CHANGED
@@ -51,9 +51,24 @@ def setup():
|
|
51
51
|
packages_registry.populate(settings.INSTALLED_PACKAGES)
|
52
52
|
|
53
53
|
|
54
|
+
class SettingsReference(str):
|
55
|
+
"""
|
56
|
+
String subclass which references a current settings value. It's treated as
|
57
|
+
the value in memory but serializes to a settings.NAME attribute reference.
|
58
|
+
"""
|
59
|
+
|
60
|
+
def __new__(self, setting_name):
|
61
|
+
value = getattr(settings, setting_name)
|
62
|
+
return str.__new__(self, value)
|
63
|
+
|
64
|
+
def __init__(self, setting_name):
|
65
|
+
self.setting_name = setting_name
|
66
|
+
|
67
|
+
|
54
68
|
__all__ = [
|
55
69
|
"setup",
|
56
70
|
"settings",
|
71
|
+
"SettingsReference",
|
57
72
|
"APP_PATH",
|
58
73
|
"__version__",
|
59
74
|
]
|
plain/runtime/user_settings.py
CHANGED
@@ -298,16 +298,3 @@ class SettingDefinition:
|
|
298
298
|
|
299
299
|
def __str__(self):
|
300
300
|
return f"SettingDefinition(name={self.name}, value={self.value}, source={self.source})"
|
301
|
-
|
302
|
-
|
303
|
-
class SettingsReference(str):
|
304
|
-
"""
|
305
|
-
String subclass which references a current settings value. It's treated as
|
306
|
-
the value in memory but serializes to a settings.NAME attribute reference.
|
307
|
-
"""
|
308
|
-
|
309
|
-
def __new__(self, value, setting_name):
|
310
|
-
return str.__new__(self, value)
|
311
|
-
|
312
|
-
def __init__(self, value, setting_name):
|
313
|
-
self.setting_name = setting_name
|
@@ -71,9 +71,9 @@ plain/preflight/registry.py,sha256=7s7f_iEwURzv-Ye515P5lJWcHltd5Ca2fsX1Wpbf1wQ,2
|
|
71
71
|
plain/preflight/security.py,sha256=sNpv5AHobPcaO48cOUGRNe2EjusTducjY8vyShR8EhI,2645
|
72
72
|
plain/preflight/urls.py,sha256=OSTLvCpftAD_8VbQ0V3p1CTPlRRwtlnXVBZeWgr7l2k,2881
|
73
73
|
plain/runtime/README.md,sha256=Q8VVO7JRGuYrDxzuYL6ptoilhclbecxKzpRXKgbWGkU,2061
|
74
|
-
plain/runtime/__init__.py,sha256=
|
74
|
+
plain/runtime/__init__.py,sha256=o2RVETiL8U0lMFBpbtfnxflhw_4MFllMV6CEpX3RqZs,1965
|
75
75
|
plain/runtime/global_settings.py,sha256=SfOhwzpZe2zpNqSpdx3hHgCN89xdbW9KJVR4KJfS_Gk,5498
|
76
|
-
plain/runtime/user_settings.py,sha256=
|
76
|
+
plain/runtime/user_settings.py,sha256=uRHHVfzUvHon91_fOKj7K2WaBYwJ1gCPLfeXqKj5CTs,10902
|
77
77
|
plain/signals/README.md,sha256=cd3tKEgH-xc88CUWyDxl4-qv-HBXx8VT32BXVwA5azA,230
|
78
78
|
plain/signals/__init__.py,sha256=eAs0kLqptuP6I31dWXeAqRNji3svplpAV4Ez6ktjwXM,131
|
79
79
|
plain/signals/dispatch/__init__.py,sha256=FzEygqV9HsM6gopio7O2Oh_X230nA4d5Q9s0sUjMq0E,292
|
@@ -134,8 +134,8 @@ plain/views/forms.py,sha256=RhlaUcZCkeqokY_fvv-NOS-kgZAG4XhDLOPbf9K_Zlc,2691
|
|
134
134
|
plain/views/objects.py,sha256=g5Lzno0Zsv0K449UpcCtxwCoO7WMRAWqKlxxV2V0_qg,8263
|
135
135
|
plain/views/redirect.py,sha256=9zHZgKvtSkdrMX9KmsRM8hJTPmBktxhc4d8OitbuniI,1724
|
136
136
|
plain/views/templates.py,sha256=cBkFNCSXgVi8cMqQbhsqJ4M_rIQYVl8cUvq9qu4YIes,1951
|
137
|
-
plain-0.
|
138
|
-
plain-0.
|
139
|
-
plain-0.
|
140
|
-
plain-0.
|
141
|
-
plain-0.
|
137
|
+
plain-0.28.0.dist-info/METADATA,sha256=52xzCQahNItM-ckeBlZHMLffEDVoHl6AwH68QXgf66s,319
|
138
|
+
plain-0.28.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
139
|
+
plain-0.28.0.dist-info/entry_points.txt,sha256=DHHprvufgd7xypiBiqMANYRnpJ9xPPYhYbnPGwOkWqE,40
|
140
|
+
plain-0.28.0.dist-info/licenses/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
|
141
|
+
plain-0.28.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|