educommon 3.14.0__py3-none-any.whl → 3.15.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.
- educommon/utils/ui.py +27 -0
- {educommon-3.14.0.dist-info → educommon-3.15.0.dist-info}/METADATA +2 -2
- {educommon-3.14.0.dist-info → educommon-3.15.0.dist-info}/RECORD +5 -5
- {educommon-3.14.0.dist-info → educommon-3.15.0.dist-info}/WHEEL +0 -0
- {educommon-3.14.0.dist-info → educommon-3.15.0.dist-info}/top_level.txt +0 -0
educommon/utils/ui.py
CHANGED
@@ -339,6 +339,33 @@ class DatetimeFilterCreator:
|
|
339
339
|
return result
|
340
340
|
|
341
341
|
|
342
|
+
class FilterByDateStr(_FilterByField):
|
343
|
+
"""Фильтр позволяет работать с датой в формате d.m.Y, m.Y, Y."""
|
344
|
+
|
345
|
+
def __init__(self, *args, **kwargs) -> None:
|
346
|
+
kwargs['date_str'] = True
|
347
|
+
|
348
|
+
super().__init__(*args, **kwargs)
|
349
|
+
|
350
|
+
self._lookup = self._lookup if self._lookup.endswith('__icontains') else f'{self._lookup}__icontains'
|
351
|
+
|
352
|
+
def get_q(self, params: dict) -> Q:
|
353
|
+
"""Метод возвращает Q-объект, построенный на основе данных словаря.
|
354
|
+
|
355
|
+
Args:
|
356
|
+
params: Словарь с лукапами.
|
357
|
+
Returns:
|
358
|
+
Q-объект, построенный на основе данных словаря.
|
359
|
+
"""
|
360
|
+
|
361
|
+
if self._uid in params:
|
362
|
+
value = '-'.join(params[self._uid].split('.')[::-1])
|
363
|
+
|
364
|
+
return Q(**{self._lookup: value})
|
365
|
+
|
366
|
+
return Q()
|
367
|
+
|
368
|
+
|
342
369
|
def switch_window_in_read_only_mode(window):
|
343
370
|
"""Переводит окно редактирования в режим "Только для чтения".
|
344
371
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: educommon
|
3
|
-
Version: 3.
|
3
|
+
Version: 3.15.0
|
4
4
|
Summary: Общая кодовая база для проектов БЦ Образование
|
5
5
|
Author-email: BARS Group <education_dev@bars-open.ru>
|
6
6
|
Project-URL: Homepage, https://stash.bars-open.ru/projects/EDUBASE/repos/educommon/browse
|
@@ -33,7 +33,7 @@ Requires-Dist: python-magic==0.4.15
|
|
33
33
|
Requires-Dist: m3-db-utils>=0.3.13
|
34
34
|
Requires-Dist: m3-django-compat<2,>=1.10.2
|
35
35
|
Requires-Dist: m3-core<3,>=2.2.16
|
36
|
-
Requires-Dist: m3-ui<3,>=2.2.
|
36
|
+
Requires-Dist: m3-ui<3,>=2.2.116
|
37
37
|
Requires-Dist: m3-objectpack<3,>=2.2.49
|
38
38
|
Requires-Dist: m3-simple-report<2,>=1.4.1
|
39
39
|
Requires-Dist: m3-spyne-smev<2,>=0.2.4
|
@@ -296,7 +296,7 @@ educommon/utils/seqtools.py,sha256=SRPlgn9KB-0cWCESfqeywfsdIbTjUopFmZYbcDQca88,4
|
|
296
296
|
educommon/utils/serializer.py,sha256=R-72kNjLa5izLXy3qLmzrBWDk-feTnJR7FwNRvGG77Y,8653
|
297
297
|
educommon/utils/storage.py,sha256=RcWAR7vxc0uZ2PODdpcNoBQGKilSaQnxxGwa0rfwlm8,2887
|
298
298
|
educommon/utils/system.py,sha256=34mUlk7OV5pgcxAucWVWe9xQ--I_u40ZByWGLtkoGdQ,2804
|
299
|
-
educommon/utils/ui.py,sha256=
|
299
|
+
educommon/utils/ui.py,sha256=ZloCrrZR7kczef4IKH02OZD0olJ-h-EVvplnlp6k6XY,17270
|
300
300
|
educommon/utils/db/__init__.py,sha256=b2hyjR6PZgP9E0LFIl8yTHgCOKO7_WEeXPqPNdbqoTg,7624
|
301
301
|
educommon/utils/db/postgresql.py,sha256=HvSCxNy6ZuHsohckmNFbWxFBoeCh-AKSRRALAGfjEd0,2786
|
302
302
|
educommon/utils/fonts/Arial.ttf,sha256=NcDzVZ2NtWnjbDEJW4pg1EFkPZX1kTneQOI_ragZuDM,275572
|
@@ -349,7 +349,7 @@ educommon/ws_log/smev/exceptions.py,sha256=VNfzNHlj5Pz8D4979d_msTkxC-RQVoMctsgoJ
|
|
349
349
|
educommon/ws_log/templates/report/smev_logs.xlsx,sha256=nnYgB0Z_ix8HoxsRICjsZfFRQBdra-5Gd8nWhCxTjYg,10439
|
350
350
|
educommon/ws_log/templates/ui-js/smev-logs-list-window.js,sha256=AGup3D8GTJSY9WdDPj0zBJeYQBFOmGgcbxPOJbKK-nY,513
|
351
351
|
educommon/ws_log/templates/ui-js/smev-logs-report-setting-window.js,sha256=nQ7QYK9frJcE7g7kIt6INg9TlEEJAPPayBJgRaoTePA,1103
|
352
|
-
educommon-3.
|
353
|
-
educommon-3.
|
354
|
-
educommon-3.
|
355
|
-
educommon-3.
|
352
|
+
educommon-3.15.0.dist-info/METADATA,sha256=_8hCUYe-OqYdSUa0pDvbkIF4peIPvOZT4_SU0kXkFek,2380
|
353
|
+
educommon-3.15.0.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
354
|
+
educommon-3.15.0.dist-info/top_level.txt,sha256=z5fbW7bz_0V1foUm_FGcZ9_MTpW3N1dBN7-kEmMowl4,10
|
355
|
+
educommon-3.15.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|