educommon 3.13.0__py3-none-any.whl → 3.13.2__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/__init__.py +0 -1
- educommon/about/ui/actions.py +16 -30
- educommon/about/ui/ui.py +3 -12
- educommon/about/utils.py +6 -5
- educommon/async_task/__init__.py +0 -1
- educommon/async_task/actions.py +18 -13
- educommon/async_task/apps.py +4 -0
- educommon/async_task/locker.py +2 -5
- educommon/async_task/migrations/0001_initial.py +55 -9
- educommon/async_task/migrations/0002_task_type_and_status_data.py +94 -89
- educommon/async_task/migrations/0003_alter_runningtask_options.py +0 -1
- educommon/async_task/models.py +9 -6
- educommon/async_task/tasks.py +11 -7
- educommon/async_task/ui.py +16 -35
- educommon/async_tasks/__init__.py +0 -1
- educommon/async_tasks/apps.py +4 -0
- educommon/async_tasks/locks.py +11 -21
- educommon/async_tasks/migrations/0001_initial.py +68 -8
- educommon/async_tasks/migrations/0002_load_initial_data.py +0 -1
- educommon/async_tasks/models.py +9 -29
- educommon/async_tasks/tasks.py +25 -54
- educommon/audit_log/__init__.py +1 -0
- educommon/audit_log/actions.py +27 -36
- educommon/audit_log/app_meta.py +7 -4
- educommon/audit_log/apps.py +44 -29
- educommon/audit_log/constants.py +7 -4
- educommon/audit_log/error_log/actions.py +1 -3
- educommon/audit_log/helpers.py +2 -4
- educommon/audit_log/management/commands/reinstall_audit_log.py +11 -7
- educommon/audit_log/migrations/0001_initial.py +91 -16
- educommon/audit_log/migrations/0002_install_audit_log.py +13 -13
- educommon/audit_log/migrations/0003_logproxy.py +1 -3
- educommon/audit_log/migrations/0004_reinstall_audit_log.py +1 -4
- educommon/audit_log/migrations/0005_postgresql_error.py +4 -2
- educommon/audit_log/migrations/0006_auto_20200806_1707.py +3 -4
- educommon/audit_log/migrations/0007_create_selective_tables_function.py +8 -5
- educommon/audit_log/migrations/0008_table_logged.py +0 -1
- educommon/audit_log/migrations/0009_reinstall_audit_log.py +0 -1
- educommon/audit_log/models.py +36 -42
- educommon/audit_log/permissions.py +11 -9
- educommon/audit_log/proxies.py +12 -23
- educommon/audit_log/ui.py +18 -15
- educommon/audit_log/utils/__init__.py +28 -60
- educommon/audit_log/utils/operations.py +16 -2
- educommon/auth/__init__.py +0 -3
- educommon/auth/rbac/__init__.py +2 -4
- educommon/auth/rbac/actions.py +148 -145
- educommon/auth/rbac/app_meta.py +9 -6
- educommon/auth/rbac/backends/base.py +2 -8
- educommon/auth/rbac/backends/caching.py +27 -37
- educommon/auth/rbac/backends/simple.py +1 -4
- educommon/auth/rbac/checker.py +1 -3
- educommon/auth/rbac/management/commands/rbac.py +6 -11
- educommon/auth/rbac/manager.py +18 -47
- educommon/auth/rbac/migrations/0001_initial.py +73 -12
- educommon/auth/rbac/migrations/0002_model_modifier_metaclass_fix.py +7 -6
- educommon/auth/rbac/migrations/0003_permission_hidden.py +1 -5
- educommon/auth/rbac/migrations/0004_auto_20171024_1245.py +26 -19
- educommon/auth/rbac/models.py +63 -68
- educommon/auth/rbac/permissions.py +6 -7
- educommon/auth/rbac/ui.py +83 -84
- educommon/auth/rbac/utils.py +10 -11
- educommon/auth/rbac/validators.py +4 -5
- educommon/auth/simple_auth/__init__.py +1 -5
- educommon/auth/simple_auth/actions.py +79 -92
- educommon/auth/simple_auth/app_meta.py +2 -9
- educommon/auth/simple_auth/checkers.py +3 -3
- educommon/auth/simple_auth/migrations/0001_initial.py +23 -4
- educommon/auth/simple_auth/validators.py +0 -1
- educommon/contingent/actions.py +7 -7
- educommon/contingent/app_meta.py +1 -4
- educommon/contingent/base.py +10 -15
- educommon/contingent/catalogs.py +424 -540
- educommon/contingent/contingent_plugin/actions.py +4 -15
- educommon/contingent/contingent_plugin/apps.py +10 -4
- educommon/contingent/contingent_plugin/migrations/0001_initial.py +5 -6
- educommon/contingent/contingent_plugin/migrations/0002_add_contingent_model_deleted.py +6 -11
- educommon/contingent/contingent_plugin/model_views.py +2 -12
- educommon/contingent/contingent_plugin/models.py +2 -7
- educommon/contingent/contingent_plugin/observer.py +14 -13
- educommon/contingent/contingent_plugin/plugin_meta.py +1 -3
- educommon/contingent/contingent_plugin/storage.py +8 -7
- educommon/contingent/contingent_plugin/utils.py +6 -6
- educommon/django/db/fields.py +72 -86
- educommon/django/db/migration/__init__.py +3 -7
- educommon/django/db/migration/operations.py +29 -51
- educommon/django/db/mixins/__init__.py +16 -10
- educommon/django/db/mixins/date_interval.py +47 -75
- educommon/django/db/mixins/validation.py +26 -26
- educommon/django/db/model_view/__init__.py +18 -22
- educommon/django/db/models.py +9 -8
- educommon/django/db/observer.py +9 -27
- educommon/django/db/partitioning/__init__.py +66 -92
- educommon/django/db/partitioning/management/commands/apply_partitioning.py +3 -13
- educommon/django/db/partitioning/management/commands/clear_table.py +18 -14
- educommon/django/db/partitioning/management/commands/split_table.py +18 -13
- educommon/django/db/routers.py +6 -15
- educommon/django/db/signals.py +4 -2
- educommon/django/db/utils.py +14 -19
- educommon/django/db/validators/__init__.py +1 -0
- educommon/django/db/validators/simple.py +72 -100
- educommon/django/storages/atcfs/api.py +39 -53
- educommon/django/storages/atcfs/app_meta.py +1 -1
- educommon/django/storages/atcfs/management/commands/atcfs_migrate.py +42 -55
- educommon/django/storages/atcfs/models.py +0 -3
- educommon/django/storages/atcfs/monkey_patching.py +18 -12
- educommon/django/storages/atcfs/storage.py +14 -23
- educommon/extjs/fields/input_params.py +15 -45
- educommon/importer/XLSReader.py +143 -241
- educommon/importer/__init__.py +86 -4
- educommon/importer/api.py +53 -84
- educommon/importer/constants.py +4 -14
- educommon/importer/loggers.py +16 -26
- educommon/importer/proxy.py +131 -176
- educommon/importer/proxy_import.py +11 -12
- educommon/importer/report.py +4 -6
- educommon/importer/ui.py +32 -26
- educommon/importer/validators.py +4 -7
- educommon/integration_entities/helpers.py +14 -18
- educommon/ioc/__init__.py +3 -6
- educommon/logger/loggers.py +10 -14
- educommon/m3/__init__.py +20 -38
- educommon/m3/extensions/__init__.py +1 -0
- educommon/m3/extensions/listeners/__init__.py +22 -38
- educommon/m3/extensions/listeners/delete_check/listeners.py +31 -41
- educommon/m3/extensions/listeners/delete_check/mixins.py +20 -25
- educommon/m3/extensions/listeners/delete_check/signals.py +2 -2
- educommon/m3/extensions/listeners/delete_check/ui.py +15 -14
- educommon/m3/extensions/listeners/delete_check/utils.py +9 -11
- educommon/m3/extensions/ui.py +15 -33
- educommon/m3/transaction_context.py +17 -19
- educommon/objectpack/actions.py +70 -88
- educommon/objectpack/apps.py +5 -0
- educommon/objectpack/filters.py +9 -15
- educommon/objectpack/ui.py +59 -77
- educommon/report/__init__.py +9 -5
- educommon/report/actions.py +29 -32
- educommon/report/constructor/__init__.py +5 -8
- educommon/report/constructor/app_meta.py +1 -3
- educommon/report/constructor/apps.py +1 -0
- educommon/report/constructor/base.py +33 -80
- educommon/report/constructor/builders/excel/_base.py +138 -286
- educommon/report/constructor/builders/excel/_header.py +2 -9
- educommon/report/constructor/builders/excel/product.py +13 -34
- educommon/report/constructor/builders/excel/with_merged_cells.py +18 -14
- educommon/report/constructor/config.py +2 -0
- educommon/report/constructor/editor/actions.py +101 -215
- educommon/report/constructor/editor/ui.py +71 -93
- educommon/report/constructor/exceptions.py +6 -12
- educommon/report/constructor/migrations/0001_initial.py +36 -44
- educommon/report/constructor/migrations/0002_report_filters.py +86 -72
- educommon/report/constructor/migrations/0003_reportfilter_exclude.py +5 -5
- educommon/report/constructor/migrations/0004_reportfilter_fields.py +22 -18
- educommon/report/constructor/migrations/0005_reportcolumn_visible.py +5 -4
- educommon/report/constructor/migrations/0006_reportsorting.py +21 -17
- educommon/report/constructor/migrations/0007_include_available_units.py +14 -14
- educommon/report/constructor/migrations/0008_auto_20170407_1318.py +4 -5
- educommon/report/constructor/migrations/0009_auto_20180405_0642.py +1 -4
- educommon/report/constructor/migrations/0010_add_aggregate_fields.py +7 -8
- educommon/report/constructor/mixins.py +14 -15
- educommon/report/constructor/models.py +76 -124
- educommon/report/constructor/utils.py +3 -8
- educommon/report/constructor/validators.py +1 -3
- educommon/report/reporter.py +25 -43
- educommon/report/utils.py +14 -40
- educommon/rest/actions.py +7 -11
- educommon/rest/context.py +6 -16
- educommon/rest/controllers.py +10 -10
- educommon/rest/mixins.py +29 -27
- educommon/secure_media/app_meta.py +9 -9
- educommon/utils/__init__.py +3 -2
- educommon/utils/caching.py +1 -3
- educommon/utils/conversion.py +1 -3
- educommon/utils/crypto.py +1 -2
- educommon/utils/date.py +13 -26
- educommon/utils/db/__init__.py +17 -26
- educommon/utils/db/postgresql.py +1 -4
- educommon/utils/fonts/__init__.py +3 -4
- educommon/utils/licence/__init__.py +5 -16
- educommon/utils/misc.py +9 -18
- educommon/utils/object_grid.py +55 -62
- educommon/utils/phone_number/modelfields.py +1 -3
- educommon/utils/phone_number/phone_number.py +5 -8
- educommon/utils/phone_number/validators.py +8 -23
- educommon/utils/plugins.py +15 -28
- educommon/utils/registry.py +2 -1
- educommon/utils/seqtools.py +1 -3
- educommon/utils/serializer.py +9 -16
- educommon/utils/storage.py +3 -2
- educommon/utils/system.py +1 -3
- educommon/utils/system_app/management/commands/delete_objects.py +17 -34
- educommon/utils/ui.py +87 -84
- educommon/utils/xml/__init__.py +2 -7
- educommon/utils/xml/resolver.py +1 -0
- educommon/ws_log/actions.py +31 -76
- educommon/ws_log/base.py +6 -20
- educommon/ws_log/migrations/0001_initial.py +25 -8
- educommon/ws_log/migrations/0002_auto_20160628_1334.py +0 -1
- educommon/ws_log/migrations/0003_add_fields_to_smev_logs.py +20 -4
- educommon/ws_log/migrations/0004_auto_20160727_1600.py +7 -6
- educommon/ws_log/migrations/0005_auto_20161130_1615.py +14 -4
- educommon/ws_log/migrations/0006_auto_20170327_1027.py +3 -2
- educommon/ws_log/migrations/0007_auto_20180607_1040.py +8 -9
- educommon/ws_log/migrations/0008_auto_20180713_1445.py +23 -10
- educommon/ws_log/migrations/0009_auto_20201130_1553.py +7 -2
- educommon/ws_log/models.py +21 -35
- educommon/ws_log/provider.py +2 -1
- educommon/ws_log/report.py +8 -13
- educommon/ws_log/smev/applications.py +12 -27
- educommon/ws_log/smev/exceptions.py +2 -3
- educommon/ws_log/ui.py +32 -32
- educommon/ws_log/utils.py +1 -3
- {educommon-3.13.0.dist-info → educommon-3.13.2.dist-info}/METADATA +26 -14
- educommon-3.13.2.dist-info/RECORD +354 -0
- educommon/utils/patches.py +0 -27
- educommon/version.conf +0 -11
- educommon-3.13.0.dist-info/RECORD +0 -357
- educommon-3.13.0.dist-info/dependency_links.txt +0 -1
- {educommon-3.13.0.dist-info → educommon-3.13.2.dist-info}/WHEEL +0 -0
- {educommon-3.13.0.dist-info → educommon-3.13.2.dist-info}/top_level.txt +0 -0
@@ -77,10 +77,11 @@ def field_ignored_by_model_params(model, accessor_name):
|
|
77
77
|
|
78
78
|
params = model.report_constructor_params
|
79
79
|
assert isinstance(params, dict), params
|
80
|
-
assert sum(
|
81
|
-
|
82
|
-
|
83
|
-
|
80
|
+
assert sum(1 if param in params else 0 for param in ('skip', 'except', 'only')) <= 1, (
|
81
|
+
'Должен быть указан только один параметр.',
|
82
|
+
model,
|
83
|
+
params,
|
84
|
+
)
|
84
85
|
|
85
86
|
if 'extra' in params and accessor_name in params['extra']:
|
86
87
|
return False
|
@@ -162,18 +163,15 @@ class ColumnDescriptor:
|
|
162
163
|
self.parent.children.append(self)
|
163
164
|
|
164
165
|
def __repr__(self, *args, **kwargs):
|
165
|
-
return '{}<{}>'.format(
|
166
|
-
self.__class__.__name__, self.full_accessor_name
|
167
|
-
)
|
166
|
+
return '{}<{}>'.format(self.__class__.__name__, self.full_accessor_name)
|
168
167
|
|
169
168
|
@staticmethod
|
170
169
|
def create(model, field_name, data_source, parent=None, level=0):
|
171
170
|
model_params = getattr(model, 'report_constructor_params', {})
|
172
|
-
assert sum(
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
'Может быть указан только один параметр.', model, model_params
|
171
|
+
assert sum(1 if param in model_params else 0 for param in ('skip', 'except', 'only')) <= 1, (
|
172
|
+
'Может быть указан только один параметр.',
|
173
|
+
model,
|
174
|
+
model_params,
|
177
175
|
)
|
178
176
|
|
179
177
|
attr_name, _, nested_attr = field_name.partition('.')
|
@@ -204,9 +202,7 @@ class ColumnDescriptor:
|
|
204
202
|
raise FieldDoesNotExist(field_name)
|
205
203
|
|
206
204
|
try:
|
207
|
-
result = ColumnDescriptor.create(
|
208
|
-
related_model, nested_attr, data_source, result, level + 1
|
209
|
-
)
|
205
|
+
result = ColumnDescriptor.create(related_model, nested_attr, data_source, result, level + 1)
|
210
206
|
except FieldDoesNotExist as error:
|
211
207
|
raise FieldDoesNotExist('.'.join((attr_name, str(error))))
|
212
208
|
|
@@ -228,15 +224,11 @@ class ColumnDescriptor:
|
|
228
224
|
descriptor = self
|
229
225
|
accessor_name = fld_accessor_name
|
230
226
|
while descriptor.parent:
|
231
|
-
accessor_name = '.'.join(
|
232
|
-
(descriptor.accessor_name, accessor_name)
|
233
|
-
)
|
227
|
+
accessor_name = '.'.join((descriptor.accessor_name, accessor_name))
|
234
228
|
if skip_field(descriptor.parent.model, field, accessor_name):
|
235
229
|
return True
|
236
230
|
# проверка, что связанная модель поля, не связана с родительскими моделями полей
|
237
|
-
if
|
238
|
-
field.related_model in descriptor.parent.related_field_models
|
239
|
-
):
|
231
|
+
if getattr(field, 'related_model', None) and field.related_model in descriptor.parent.related_field_models:
|
240
232
|
return True
|
241
233
|
|
242
234
|
descriptor = descriptor.parent
|
@@ -288,18 +280,14 @@ class ColumnDescriptor:
|
|
288
280
|
@property
|
289
281
|
def full_accessor_name(self):
|
290
282
|
if self.parent:
|
291
|
-
return '.'.join(
|
292
|
-
(self.parent.full_accessor_name, self.accessor_name)
|
293
|
-
)
|
283
|
+
return '.'.join((self.parent.full_accessor_name, self.accessor_name))
|
294
284
|
else:
|
295
285
|
return self.accessor_name
|
296
286
|
|
297
287
|
@property
|
298
288
|
def full_lookup(self):
|
299
289
|
if self.parent:
|
300
|
-
return '__'.join(
|
301
|
-
(self.parent.full_lookup, self.lookup)
|
302
|
-
)
|
290
|
+
return '__'.join((self.parent.full_lookup, self.lookup))
|
303
291
|
else:
|
304
292
|
return self.lookup
|
305
293
|
|
@@ -323,10 +311,7 @@ class ColumnDescriptor:
|
|
323
311
|
|
324
312
|
@property
|
325
313
|
def title(self):
|
326
|
-
if
|
327
|
-
self.data_source.field_titles and
|
328
|
-
self.full_accessor_name in self.data_source.field_titles
|
329
|
-
):
|
314
|
+
if self.data_source.field_titles and self.full_accessor_name in self.data_source.field_titles:
|
330
315
|
return self.data_source.field_titles[self.full_accessor_name]
|
331
316
|
|
332
317
|
if isinstance(self.field, ForeignObjectRel):
|
@@ -348,9 +333,7 @@ class ColumnDescriptor:
|
|
348
333
|
:rtype: str
|
349
334
|
"""
|
350
335
|
if self.parent:
|
351
|
-
return delimiter.join((
|
352
|
-
self.parent.get_full_title(delimiter), self.title
|
353
|
-
))
|
336
|
+
return delimiter.join((self.parent.get_full_title(delimiter), self.title))
|
354
337
|
else:
|
355
338
|
return self.title
|
356
339
|
|
@@ -374,10 +357,7 @@ class ColumnDescriptor:
|
|
374
357
|
if not self._check_to_exclude(field):
|
375
358
|
return True
|
376
359
|
|
377
|
-
if (
|
378
|
-
hasattr(self.model, 'report_constructor_params') and
|
379
|
-
'extra' in self.model.report_constructor_params
|
380
|
-
):
|
360
|
+
if hasattr(self.model, 'report_constructor_params') and 'extra' in self.model.report_constructor_params:
|
381
361
|
extra = self.model.report_constructor_params['extra']
|
382
362
|
for accessor_name, params in extra.items():
|
383
363
|
field = ExtraField(accessor_name, params['field'])
|
@@ -392,28 +372,19 @@ class ColumnDescriptor:
|
|
392
372
|
else:
|
393
373
|
for field in getattr(self.model, '_meta').get_fields():
|
394
374
|
if not self._check_to_exclude(field):
|
395
|
-
yield ColumnDescriptor(
|
396
|
-
self.data_source, self, field, level=self.level + 1
|
397
|
-
)
|
375
|
+
yield ColumnDescriptor(self.data_source, self, field, level=self.level + 1)
|
398
376
|
|
399
|
-
if (
|
400
|
-
hasattr(self.model, 'report_constructor_params') and
|
401
|
-
'extra' in self.model.report_constructor_params
|
402
|
-
):
|
377
|
+
if hasattr(self.model, 'report_constructor_params') and 'extra' in self.model.report_constructor_params:
|
403
378
|
extra = self.model.report_constructor_params['extra']
|
404
379
|
for accessor_name, params in extra.items():
|
405
380
|
field = ExtraField(accessor_name, params['field'])
|
406
381
|
if not self._check_to_exclude(field):
|
407
|
-
yield ColumnDescriptor(
|
408
|
-
self.data_source,
|
409
|
-
self, field,
|
410
|
-
level=self.level + 1
|
411
|
-
)
|
382
|
+
yield ColumnDescriptor(self.data_source, self, field, level=self.level + 1)
|
412
383
|
|
413
384
|
def validate_value(self, value):
|
414
385
|
"""Проверяет текстовое представление значения на соотв-е типу поля.
|
415
386
|
|
416
|
-
:param
|
387
|
+
:param str value: Текстовое представление значения для проверки.
|
417
388
|
|
418
389
|
:raises django.core.exceptions.ValidationError: если значение аргумента
|
419
390
|
value не прошло проверку. Описание ошибки будет в исключении.
|
@@ -432,10 +403,7 @@ class ColumnDescriptor:
|
|
432
403
|
if choice_display.lower() == lower_case_value:
|
433
404
|
break
|
434
405
|
else:
|
435
|
-
raise ValidationError(
|
436
|
-
'Недопустимое значение для сравнения: {}.'
|
437
|
-
.format(value)
|
438
|
-
)
|
406
|
+
raise ValidationError('Недопустимое значение для сравнения: {}.'.format(value))
|
439
407
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
440
408
|
|
441
409
|
else:
|
@@ -562,9 +530,7 @@ class ModelDataSourceParams(_ModelDataSourceInfo):
|
|
562
530
|
|
563
531
|
def get_data_source_descriptor(self):
|
564
532
|
"""Возвращает дескриптор источника данных."""
|
565
|
-
return ModelDataSourceDescriptor(
|
566
|
-
self._model.get_model(), self._filter_func, self.field_titles
|
567
|
-
)
|
533
|
+
return ModelDataSourceDescriptor(self._model.get_model(), self._filter_func, self.field_titles)
|
568
534
|
|
569
535
|
|
570
536
|
class ModelDataSourceDescriptor(_ModelDataSourceInfo):
|
@@ -592,10 +558,7 @@ class ModelDataSourceDescriptor(_ModelDataSourceInfo):
|
|
592
558
|
if not skip_field(model, field, _get_accessor_name(field)):
|
593
559
|
yield ColumnDescriptor(self, None, field)
|
594
560
|
|
595
|
-
if (
|
596
|
-
hasattr(model, 'report_constructor_params') and
|
597
|
-
'extra' in model.report_constructor_params
|
598
|
-
):
|
561
|
+
if hasattr(model, 'report_constructor_params') and 'extra' in model.report_constructor_params:
|
599
562
|
extra = model.report_constructor_params['extra']
|
600
563
|
for accessor_name, params in extra.items():
|
601
564
|
field = ExtraField(accessor_name, params['field'])
|
@@ -628,15 +591,13 @@ class ModelDataSourceDescriptor(_ModelDataSourceInfo):
|
|
628
591
|
|
629
592
|
else:
|
630
593
|
if (
|
631
|
-
hasattr(model, 'report_constructor_params')
|
632
|
-
'extra' in model.report_constructor_params
|
633
|
-
field_name in model.report_constructor_params['extra']
|
594
|
+
hasattr(model, 'report_constructor_params')
|
595
|
+
and 'extra' in model.report_constructor_params
|
596
|
+
and field_name in model.report_constructor_params['extra']
|
634
597
|
):
|
635
598
|
column_field = get_field(model, field_name)
|
636
599
|
else:
|
637
|
-
raise FieldDoesNotExist(
|
638
|
-
'{}.{}'.format(model.__name__, field_name)
|
639
|
-
)
|
600
|
+
raise FieldDoesNotExist('{}.{}'.format(model.__name__, field_name))
|
640
601
|
|
641
602
|
return column_field, model
|
642
603
|
|
@@ -695,18 +656,14 @@ class ModelDataSourceDescriptor(_ModelDataSourceInfo):
|
|
695
656
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
696
657
|
# Поиск поля в модели.
|
697
658
|
|
698
|
-
column_field, model = self._get_model_field_by_name(
|
699
|
-
model, level_name
|
700
|
-
)
|
659
|
+
column_field, model = self._get_model_field_by_name(model, level_name)
|
701
660
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
702
661
|
# Создание дескриптора столбца, если его нет в кэше.
|
703
662
|
|
704
663
|
if full_accessor_name in self.column_descriptors_cache:
|
705
664
|
result = self.column_descriptors_cache[full_accessor_name]
|
706
665
|
else:
|
707
|
-
result = ColumnDescriptor(
|
708
|
-
self, result, column_field, len(level_names) - 1
|
709
|
-
)
|
666
|
+
result = ColumnDescriptor(self, result, column_field, len(level_names) - 1)
|
710
667
|
self.column_descriptors_cache[full_accessor_name] = result
|
711
668
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
712
669
|
|
@@ -732,17 +689,13 @@ class ModelDataSourceDescriptor(_ModelDataSourceInfo):
|
|
732
689
|
result = self.column_descriptors_cache[full_accessor_name]
|
733
690
|
|
734
691
|
if not model:
|
735
|
-
return ColumnDescriptor(
|
736
|
-
self, result, FakeField(column_name), len(level_names) - 1
|
737
|
-
)
|
692
|
+
return ColumnDescriptor(self, result, FakeField(column_name), len(level_names) - 1)
|
738
693
|
# Создание дескриптора столбца, если его нет в кэше.
|
739
694
|
|
740
695
|
if full_accessor_name in self.column_descriptors_cache:
|
741
696
|
result = self.column_descriptors_cache[full_accessor_name]
|
742
697
|
else:
|
743
|
-
result = ColumnDescriptor(
|
744
|
-
self, result, FakeField(column_name), len(level_names) - 1
|
745
|
-
)
|
698
|
+
result = ColumnDescriptor(self, result, FakeField(column_name), len(level_names) - 1)
|
746
699
|
self.column_descriptors_cache[full_accessor_name] = result
|
747
700
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
748
701
|
|