appier 1.34.10__py2.py3-none-any.whl → 1.34.12__py2.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.
- appier/__init__.py +1 -0
- appier/base.py +4 -0
- appier/validation.py +13 -0
- {appier-1.34.10.dist-info → appier-1.34.12.dist-info}/METADATA +1 -1
- {appier-1.34.10.dist-info → appier-1.34.12.dist-info}/RECORD +8 -8
- {appier-1.34.10.dist-info → appier-1.34.12.dist-info}/LICENSE +0 -0
- {appier-1.34.10.dist-info → appier-1.34.12.dist-info}/WHEEL +0 -0
- {appier-1.34.10.dist-info → appier-1.34.12.dist-info}/top_level.txt +0 -0
appier/__init__.py
CHANGED
appier/base.py
CHANGED
|
@@ -1264,6 +1264,7 @@ class App(
|
|
|
1264
1264
|
self.add_filter(self.strip, "strip")
|
|
1265
1265
|
self.add_filter(self.sentence, "sentence")
|
|
1266
1266
|
self.add_filter(self.absolute_url, "absolute_url")
|
|
1267
|
+
self.add_filter(self.callable, "callable")
|
|
1267
1268
|
|
|
1268
1269
|
self.add_filter(self.script_tag_jinja, "script_tag", type="eval")
|
|
1269
1270
|
self.add_filter(self.css_tag_jinja, "css_tag", type="eval")
|
|
@@ -3735,6 +3736,9 @@ class App(
|
|
|
3735
3736
|
value = base_url + prefix + value
|
|
3736
3737
|
return value
|
|
3737
3738
|
|
|
3739
|
+
def callable(self, value):
|
|
3740
|
+
return callable(value)
|
|
3741
|
+
|
|
3738
3742
|
def url_for(
|
|
3739
3743
|
self,
|
|
3740
3744
|
type,
|
appier/validation.py
CHANGED
|
@@ -151,6 +151,19 @@ def safe(comparison):
|
|
|
151
151
|
return False
|
|
152
152
|
|
|
153
153
|
|
|
154
|
+
def custom(name, callable, message="value is not valid", locale=True):
|
|
155
|
+
def validation(object, ctx):
|
|
156
|
+
value = object.get(name, None)
|
|
157
|
+
if value == None:
|
|
158
|
+
return True
|
|
159
|
+
if callable(value):
|
|
160
|
+
return True
|
|
161
|
+
message_l = _to_locale(message) if locale else message
|
|
162
|
+
raise exceptions.ValidationInternalError(name, message_l)
|
|
163
|
+
|
|
164
|
+
return validation
|
|
165
|
+
|
|
166
|
+
|
|
154
167
|
def eq(name, value_c, message="must be equal to %s", locale=True):
|
|
155
168
|
def validation(object, ctx):
|
|
156
169
|
value = object.get(name, None)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
appier/__init__.py,sha256=
|
|
1
|
+
appier/__init__.py,sha256=YsoKeAEMyD5OWJWGe0x6fufIypPkKj4W5B0I31jqfjE,9449
|
|
2
2
|
appier/amqp.py,sha256=etYxUlfaK27Og_9FJ6qCgNLSYhnz9XgVhIhSmD2ITW4,3852
|
|
3
3
|
appier/api.py,sha256=ZWRdjrEEUvCDcW_pp2BDgGCdNnS7tjdaZSzUfzSRzmQ,14778
|
|
4
4
|
appier/asgi.py,sha256=Gubv7W8aLeLhaBxInE2Gc7Y2rxacbSlglAaKj25T6NY,12622
|
|
@@ -6,7 +6,7 @@ appier/async_neo.py,sha256=CqeVtKczXt3SZPvi0BYLujVTeN4i-sT8P1_0JPR5aiI,5448
|
|
|
6
6
|
appier/async_old.py,sha256=83YuTmoZkLIeyNHLZusCXqxB_6onRmYdKJ-Sqd1Yi1E,9195
|
|
7
7
|
appier/asynchronous.py,sha256=a1LQa3wbGMaXELhF7W71dRr1klPOj6x-ST9EInvPhtU,1757
|
|
8
8
|
appier/asynchronous.pyi,sha256=5CpLkpKcUq09woMOVYwpl24Pli0A8Xu6nXoT20xDQ-o,104
|
|
9
|
-
appier/base.py,sha256=
|
|
9
|
+
appier/base.py,sha256=6OhCkyM8MNa-eOIXXaYOCui0xUbSPq07ZJGqcXiwVJ0,272193
|
|
10
10
|
appier/base.pyi,sha256=CwhdTt6lVGiXsXQewN1kkISD1YRNPCUf9U8fxYUVI3E,2924
|
|
11
11
|
appier/bus.py,sha256=GyzP_qkTRDNi-NA9XV0U3YnibUn2TWH0w2fGG_a0IWo,8086
|
|
12
12
|
appier/bus.pyi,sha256=W6_MIBpvDq468wfT5XM2WpPuR3O49QiZMOSCdMsJWos,182
|
|
@@ -59,7 +59,7 @@ appier/storage.py,sha256=Qp_CMCDg85q35n9lggNVBZRWwlGrQ-nLYNj0W7Mnbec,7470
|
|
|
59
59
|
appier/structures.py,sha256=lwAEiz4k1O4bywGcfHvOvZJusN-lUwcviihR9aZLMtY,8883
|
|
60
60
|
appier/typesf.py,sha256=XIYRQ2M7ErjvjB0SAu4Rkv3aYUOmWhqfZy3sUYyHtpM,37451
|
|
61
61
|
appier/util.py,sha256=ogWRbNbyWcfVCU_pPzADXsMTwLi3Hd2wPOWzDw3K-IQ,84705
|
|
62
|
-
appier/validation.py,sha256=
|
|
62
|
+
appier/validation.py,sha256=dMxAELEKGo93ta2UpY88UQAbiKq61b9pHd5L5pAkECk,22800
|
|
63
63
|
appier/res/static/css/base.css,sha256=J9zLozd57KoslAsrsj2a42glGTObxbkrrckR-W-_f2A,6127
|
|
64
64
|
appier/res/static/images/favicon.ico,sha256=fAL8DLx_0Yl6jwpRG_K6S7g3yXxr9Hyjn3JmqyU8t7U,1150
|
|
65
65
|
appier/res/static/js/base.js,sha256=8o0rvcqF3O2gfPTQgna2ni56IBbr50xCYU8Eq-LSRQI,4953
|
|
@@ -95,8 +95,8 @@ appier/test/tags.py,sha256=uf52pCsZL4-yp7i3Tk7F9T6aN4uYvYxbwcUUo-b7-0E,3861
|
|
|
95
95
|
appier/test/typesf.py,sha256=KHumQFzx7wPZSCb8_mpIwobhIy2Fh_0XYviwPjXMbKI,9680
|
|
96
96
|
appier/test/util.py,sha256=vfnleU3BUaqMs1mrpXjKom3V_zFOzrsjhmQ8sYp1GaQ,46668
|
|
97
97
|
appier/test/validation.py,sha256=riOCsGKob1P5jnbcB5qGZ45ApimNAVS0byg9v_uUdrk,4952
|
|
98
|
-
appier-1.34.
|
|
99
|
-
appier-1.34.
|
|
100
|
-
appier-1.34.
|
|
101
|
-
appier-1.34.
|
|
102
|
-
appier-1.34.
|
|
98
|
+
appier-1.34.12.dist-info/LICENSE,sha256=Pd-b5cKP4n2tFDpdx27qJSIq0d1ok0oEcGTlbtL6QMU,11560
|
|
99
|
+
appier-1.34.12.dist-info/METADATA,sha256=rT3CvFXm-wQtf8GOQ3ePG0I-Jmuo0v9ngNkvlUfkfn8,1921
|
|
100
|
+
appier-1.34.12.dist-info/WHEEL,sha256=kGT74LWyRUZrL4VgLh6_g12IeVl_9u9ZVhadrgXZUEY,110
|
|
101
|
+
appier-1.34.12.dist-info/top_level.txt,sha256=Z2e_Y1ya06a554WwQZkfNRiaaQxqsdaPtBzrck384Lo,7
|
|
102
|
+
appier-1.34.12.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|