clear-skies 1.19.7__py3-none-any.whl → 1.19.9__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.
Potentially problematic release.
This version of clear-skies might be problematic. Click here for more details.
- {clear_skies-1.19.7.dist-info → clear_skies-1.19.9.dist-info}/METADATA +1 -1
- {clear_skies-1.19.7.dist-info → clear_skies-1.19.9.dist-info}/RECORD +8 -8
- clearskies/column_types/audit.py +7 -1
- clearskies/input_requirements/__init__.py +12 -2
- clearskies/input_requirements/after.py +1 -1
- clearskies/input_requirements/before.py +1 -1
- {clear_skies-1.19.7.dist-info → clear_skies-1.19.9.dist-info}/LICENSE +0 -0
- {clear_skies-1.19.7.dist-info → clear_skies-1.19.9.dist-info}/WHEEL +0 -0
|
@@ -55,7 +55,7 @@ clearskies/backends/restful_api_advanced_search_backend.py,sha256=uiR4SEKhLNmczY
|
|
|
55
55
|
clearskies/backends/secrets_backend.py,sha256=4lzrgdL_O_pgCT5HknV2gotFgp9GzjQ5_2n0-4H4kvs,2204
|
|
56
56
|
clearskies/binding_config.py,sha256=bF8LBNEgJacwKCqToAtDqN9hv5omzU7zt_4qB9KPtE0,457
|
|
57
57
|
clearskies/column_types/__init__.py,sha256=QHEFFd3wRXvaOR7uZk-bpVLlLoTiN3D4S8sBU9rFwCE,4330
|
|
58
|
-
clearskies/column_types/audit.py,sha256=
|
|
58
|
+
clearskies/column_types/audit.py,sha256=kYCjEDXx6VLjdGSTN05AE10OBj2RDyvsDCVrhPR86wE,8259
|
|
59
59
|
clearskies/column_types/belongs_to.py,sha256=tH1tbTOfjifSNuVjO-KbMF7GiUIoLfcDItrrS3TGGM8,11044
|
|
60
60
|
clearskies/column_types/boolean.py,sha256=1yyM1CUfgD84pPE65c1OP1Qjf_J0Z45hjPrDR51AUkQ,1878
|
|
61
61
|
clearskies/column_types/category_tree.py,sha256=PgNmzZPyqYS5NADH_QTCxLvDXZFxzv5ESKTkvPrrLXo,9140
|
|
@@ -159,9 +159,9 @@ clearskies/input_outputs/exceptions/cli_input_error.py,sha256=kOFU8aLTLmeTL_AKDs
|
|
|
159
159
|
clearskies/input_outputs/exceptions/cli_not_found.py,sha256=JBBuZA9ZwdkPhd3a0qaGgEPQrxh1fehy4R3ZaV2gWXU,39
|
|
160
160
|
clearskies/input_outputs/input_output.py,sha256=vYKn9SE5erS4LuOhhAsXqaOEsGXwZ1NJ4v85KN1Xg6A,4501
|
|
161
161
|
clearskies/input_outputs/wsgi.py,sha256=9p82eJP5FUAI6jbIojvydG3_9gncX7vcUACQMyRN9x4,3142
|
|
162
|
-
clearskies/input_requirements/__init__.py,sha256=
|
|
163
|
-
clearskies/input_requirements/after.py,sha256=
|
|
164
|
-
clearskies/input_requirements/before.py,sha256=
|
|
162
|
+
clearskies/input_requirements/__init__.py,sha256=vIqm8KDiomQSxT7WjogFi1yOOrsVrNMb5GKlfw5USNk,1836
|
|
163
|
+
clearskies/input_requirements/after.py,sha256=TXy8bIVz_77a8oJuohPwoM5E--AOVWsOSjjh5PpA2Ys,1544
|
|
164
|
+
clearskies/input_requirements/before.py,sha256=iLg-Hub9iW2eP19s5fkPrA9TCT_-DTm5KoxgA8ho0-k,1547
|
|
165
165
|
clearskies/input_requirements/in_the_future_at_least.py,sha256=PLVp_2Yv-1ScKnajlc9hjG7qYZhadKXHNTkRP7WKUdo,739
|
|
166
166
|
clearskies/input_requirements/in_the_future_at_most.py,sha256=L5Oz47KAHv5WL6Nu2vGkql6q8Ha9IKJMj-uxQkyuIdc,737
|
|
167
167
|
clearskies/input_requirements/in_the_past_at_least.py,sha256=ES0SgtADHcu7HZDdvIFyD9vpYTnrd4hBi03OShqUZg4,735
|
|
@@ -199,7 +199,7 @@ clearskies/tests/simple_api/models/__init__.py,sha256=nUA0W6fgXw_Bxa9CudkaDkC80t
|
|
|
199
199
|
clearskies/tests/simple_api/models/status.py,sha256=PEhPbaQh5qdUNHp8O0gz91LOLENAEBtqSaHxUPXchaM,699
|
|
200
200
|
clearskies/tests/simple_api/models/user.py,sha256=5_P4Tp1tTdX7PkMJ__epPM5MA7JAeVYGas69vcWloLc,819
|
|
201
201
|
clearskies/tests/simple_api/users_api.py,sha256=KYXCgEofDxHeRdQK67txN5oYUPvxxmB8JTku7L-apk4,2344
|
|
202
|
-
clear_skies-1.19.
|
|
203
|
-
clear_skies-1.19.
|
|
204
|
-
clear_skies-1.19.
|
|
205
|
-
clear_skies-1.19.
|
|
202
|
+
clear_skies-1.19.9.dist-info/LICENSE,sha256=3Ehd0g3YOpCj8sqj0Xjq5qbOtjjgk9qzhhD9YjRQgOA,1053
|
|
203
|
+
clear_skies-1.19.9.dist-info/METADATA,sha256=UafNzDmV9XcXfih62yaNTv3P15ItNVC0Mgvu501WneU,1366
|
|
204
|
+
clear_skies-1.19.9.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
|
|
205
|
+
clear_skies-1.19.9.dist-info/RECORD,,
|
clearskies/column_types/audit.py
CHANGED
|
@@ -186,7 +186,7 @@ class Audit(has_many.HasMany):
|
|
|
186
186
|
self._parent_columns = self.di.build(self.model_class, cache=True).columns()
|
|
187
187
|
return self._parent_columns
|
|
188
188
|
|
|
189
|
-
def record(self, model, action, data=None):
|
|
189
|
+
def record(self, model, action, data=None, record_data=None):
|
|
190
190
|
audit_data = {
|
|
191
191
|
"class": self.config("parent_class_name"),
|
|
192
192
|
"resource_id": model.get(self.config("parent_id_column_name")),
|
|
@@ -194,6 +194,12 @@ class Audit(has_many.HasMany):
|
|
|
194
194
|
}
|
|
195
195
|
if data is not None:
|
|
196
196
|
audit_data["data"] = data
|
|
197
|
+
if record_data is not None:
|
|
198
|
+
audit_data = {
|
|
199
|
+
**audit_data,
|
|
200
|
+
**record_data,
|
|
201
|
+
}
|
|
202
|
+
|
|
197
203
|
self.child_models.create(audit_data)
|
|
198
204
|
|
|
199
205
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import datetime
|
|
2
2
|
|
|
3
|
+
from .after import After
|
|
4
|
+
from .before import Before
|
|
3
5
|
from ..binding_config import BindingConfig
|
|
4
6
|
from .minimum_length import MinimumLength
|
|
5
7
|
from .maximum_length import MaximumLength
|
|
@@ -13,11 +15,19 @@ from .in_the_past_at_most import InThePastAtMost
|
|
|
13
15
|
from .time_delta import TimeDelta
|
|
14
16
|
|
|
15
17
|
|
|
16
|
-
def
|
|
18
|
+
def after(other_column_name: str, allow_equal: bool = False):
|
|
19
|
+
return BindingConfig(After, other_column_name=other_column_name, allow_equal=allow_equal)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def before(other_column_name: str, allow_equal: bool = False):
|
|
23
|
+
return BindingConfig(Before, other_column_name=other_column_name, allow_equal=allow_equal)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def minimum_length(minimum_length: int):
|
|
17
27
|
return BindingConfig(MinimumLength, minimum_length)
|
|
18
28
|
|
|
19
29
|
|
|
20
|
-
def maximum_length(maximum_length):
|
|
30
|
+
def maximum_length(maximum_length: int):
|
|
21
31
|
return BindingConfig(MaximumLength, maximum_length)
|
|
22
32
|
|
|
23
33
|
|
|
@@ -4,7 +4,7 @@ import dateparser
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class After(Requirement):
|
|
7
|
-
def configure(self, other_column_name: str, allow_equal=False):
|
|
7
|
+
def configure(self, other_column_name: str, allow_equal: bool = False):
|
|
8
8
|
self.other_column_name = other_column_name
|
|
9
9
|
self.allow_equal = allow_equal
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ import dateparser
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class Before(Requirement):
|
|
7
|
-
def configure(self, other_column_name: str, allow_equal=False):
|
|
7
|
+
def configure(self, other_column_name: str, allow_equal: bool = False):
|
|
8
8
|
self.other_column_name = other_column_name
|
|
9
9
|
self.allow_equal = allow_equal
|
|
10
10
|
|
|
File without changes
|
|
File without changes
|