Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import feature: show the differences of an element when it is updated by an import (and refactor) #810

Merged
merged 205 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
205 commits
Select commit Hold shift + click to select a range
95b781c
chore: refactor core import_elements
MyPyDavid Nov 1, 2023
9dcb043
feat: add check_diff_instance
MyPyDavid Nov 1, 2023
c5d1cf1
feat: add diff to import_attribute method
MyPyDavid Nov 1, 2023
da07164
chore: add import component diffs
MyPyDavid Nov 3, 2023
1bf1c16
build: add react-diff-viewer-continued to package.json
MyPyDavid Nov 8, 2023
cc47a04
feat: refactor diff import to attribute
MyPyDavid Nov 8, 2023
5fb58a8
chore: revert ImportAttribute
MyPyDavid Nov 8, 2023
8b8135e
feat: add diffs to Fields component
MyPyDavid Nov 8, 2023
daa3fc3
rename Diffs to FieldsDiffs
MyPyDavid Nov 9, 2023
f1f3209
add info and filter to import.js
MyPyDavid Nov 9, 2023
ac0f34a
add condition for Diffs div
MyPyDavid Nov 9, 2023
e76570a
chore: refactor import methods, add get_or_return_instance function
MyPyDavid Nov 9, 2023
abad7b6
refactor imports: move methods partially to management
MyPyDavid Nov 10, 2023
921d495
feat: add FieldsDiffs import component
MyPyDavid Nov 10, 2023
3313c2c
fix import_catalog, add missing save and fix typo QuestionSet
MyPyDavid Nov 13, 2023
4cf1acf
chore: refactor original element when updated
MyPyDavid Nov 13, 2023
f79187c
refactor imported_elements in ImportViewSet
MyPyDavid Nov 13, 2023
bd864ef
tests: fix test_create in test_viewset_upload
MyPyDavid Nov 13, 2023
de91181
chore: refactor lang field and common, mv ElementImportHelper
MyPyDavid Nov 13, 2023
f10baef
chore: refactor imports mv methods back to apps, fix original
MyPyDavid Nov 13, 2023
e6cb7b7
chore: mv all import components to ImportElement
MyPyDavid Nov 13, 2023
e85df4d
chore: rename element to instance, add type check for str
MyPyDavid Nov 13, 2023
d1557cd
chore: fix logging message string format
MyPyDavid Nov 14, 2023
574b58a
mv common import methods to management
MyPyDavid Nov 21, 2023
ac2f019
remove dotted_path from helpers
MyPyDavid Nov 21, 2023
937463d
move rdmo model mapping to constans
MyPyDavid Nov 21, 2023
3e8f802
move common methods into import_element
MyPyDavid Nov 21, 2023
06d9d12
chore: fix filter warnings and typing
MyPyDavid Nov 22, 2023
b5548ce
chore: fix typo
MyPyDavid Nov 22, 2023
1ee3d05
chore: fix lang fields for imports
MyPyDavid Jan 11, 2024
0ee3e79
chore: refactor check permissions for import
MyPyDavid Jan 11, 2024
fc07659
refactor: add model type to import instance arg
MyPyDavid Jan 11, 2024
cddd210
fix import option, add additional_input
MyPyDavid Jan 11, 2024
06d9323
refactor: import options tests
MyPyDavid Jan 11, 2024
b4a1104
chore: add isEmpty for updated_and_changed check
MyPyDavid Jan 15, 2024
32d6ce0
chore: add component for ImportSuccesElement
MyPyDavid Jan 15, 2024
7a3fa03
feat: add import/showElements button
MyPyDavid Jan 15, 2024
1346840
chore: rename fields to element
MyPyDavid Jan 15, 2024
0b07aea
chore: add updated_and_changed to excludeKeys
MyPyDavid Jan 15, 2024
a296380
chore: update Import component
MyPyDavid Jan 15, 2024
2a1c27a
chore: refactor import permissions check and set foreign fields
MyPyDavid Jan 15, 2024
448adf6
refactor: import_elements arg
MyPyDavid Jan 15, 2024
2f500a5
chore: update import functions, add updated_and_changed field
MyPyDavid Jan 15, 2024
355d047
tests: refactor to read_xml_and_parse_to_elements function
MyPyDavid Jan 15, 2024
6b188b0
chore: rename to import_func
MyPyDavid Jan 16, 2024
632239b
chore: fix element init dict and refactor original funcs
MyPyDavid Jan 18, 2024
1dacf09
chore: import js rename obj to element
MyPyDavid Jan 19, 2024
0d5632c
feat: import sidebar add select and show ChangedElements
MyPyDavid Jan 19, 2024
c09a50c
refactor: remove specific Import components, replaced by ImportElement
MyPyDavid Jan 22, 2024
31ae41d
chore: update js import Fields and FieldsDiff
MyPyDavid Jan 22, 2024
30280b6
refactor: add serializer arg to ElementImportHelper
MyPyDavid Jan 22, 2024
71b42d3
chore: let read only serializer handle request is None
MyPyDavid Jan 22, 2024
5ad91e2
refactor: pass request instead user to import_elements
MyPyDavid Jan 22, 2024
b129f15
refactor: use serializers to make diff check updated_and_changed, fix…
MyPyDavid Jan 22, 2024
296030c
refactor: move current site adders to management import
MyPyDavid Jan 24, 2024
35b97e6
js remove original field
MyPyDavid Jan 24, 2024
ec0eefe
refactor: move extra fields setter to management import
MyPyDavid Jan 24, 2024
c75bb7d
tests: add import tests for updated and changed fields
MyPyDavid Jan 24, 2024
a1e69b9
chore: add file to importActions.js and importsReducer.js
MyPyDavid Jan 29, 2024
45e9e0c
chore: add file configActions arg to Import component
MyPyDavid Jan 29, 2024
bf2a7fe
feat: add filters to Import component
MyPyDavid Jan 29, 2024
1c8622f
chore: fix typos in ImportSidebar.js
MyPyDavid Jan 29, 2024
110ea12
chore: fix typing typo and arg
MyPyDavid Jan 29, 2024
feccc59
chore: refactor import warning messages into dict of uris
MyPyDavid Jan 29, 2024
bb343d7
chore: fix typing of Set for py38
MyPyDavid Jan 30, 2024
07963e2
refactor: move all import function calls to management, leave only El…
MyPyDavid Jan 30, 2024
509feaa
js: refactor Links, add ShowUpdatedLink
MyPyDavid Jan 31, 2024
ee6b3b2
chore: import handle when uri prefix endswith "/"
MyPyDavid Jan 31, 2024
51f4d2f
refactor: rename var in ImportElement.js
MyPyDavid Jan 31, 2024
ed66128
feat: draft add ImportWarnings.js
MyPyDavid Jan 31, 2024
f5fa507
chore: add xml version validation to UploadViewSet
MyPyDavid Feb 1, 2024
0fd7f36
js: remove isEmpty(oldVal) from FieldsDiffs.js
MyPyDavid Feb 7, 2024
4942594
js: fix typos in UriPath component
MyPyDavid Feb 7, 2024
761337b
js: catch null values for key and buildUri
MyPyDavid Feb 7, 2024
1121f96
js: refactor Import Info and Warnings parts into components
MyPyDavid Feb 7, 2024
49f43c9
js: cast values to String in FieldsDiffs.js
MyPyDavid Feb 7, 2024
a54d535
js: refactor Import Info and Warnings parts into components
MyPyDavid Feb 7, 2024
9680daf
chore: add error message to import missing key when build_path
MyPyDavid Feb 7, 2024
98407b3
js: draft add ImportFilters.js component
MyPyDavid Feb 7, 2024
993939e
tests: add tests for errors in xml upload
MyPyDavid Feb 8, 2024
7b06876
refactor xml parsing into XmlParser class for import
MyPyDavid Feb 15, 2024
798fca2
js refactor Import and ImportInfo, fix ImportFilters
MyPyDavid Feb 16, 2024
8d2fe8a
fix set_lang_field at import and refactor ElementImportHelper
MyPyDavid Feb 19, 2024
d8bbd88
js add set initial state at import/uploadFileInit
MyPyDavid Feb 21, 2024
12d4c32
refactor set_foreign_field import func and minor change in set_extra_…
MyPyDavid Feb 21, 2024
198f374
refactor: add model fields to ElementImportHelpers
MyPyDavid Feb 21, 2024
4f7748f
tests: refactor import tests to use delete_all_objects func
MyPyDavid Feb 21, 2024
e4afb68
refactor: check for type parsed version
MyPyDavid Feb 21, 2024
32ad357
tests: refactor frontend tests and add frontend_import test
MyPyDavid Feb 22, 2024
9d4a2a1
tests: refactor import tests
MyPyDavid Feb 22, 2024
0aac03b
chore: clean up import_element func
MyPyDavid Feb 22, 2024
b42321d
chore: add custom common_fields to Attribute import helper
MyPyDavid Feb 22, 2024
996e04d
fix: py3.8 compatibility, remove dataclass kw_only kwarg
MyPyDavid Feb 23, 2024
a4722e2
tests: refactor frontend tests and add frontend_import test
MyPyDavid Feb 23, 2024
0a5abbd
tests: refactor frontend tests and add frontend_import test
MyPyDavid Feb 23, 2024
25a0b73
js: fix typo in FieldsDiffs.js
MyPyDavid Feb 26, 2024
e95ea37
chore: remove key from default common import fields
MyPyDavid Feb 26, 2024
c89979e
chore: fix ElementImportHelper definitions for Options
MyPyDavid Feb 26, 2024
256c459
feat: add track changes for each field during import
MyPyDavid Feb 26, 2024
2c30005
tests: add tests file with m2m changes for optionsets import
MyPyDavid Feb 26, 2024
740f7e0
chore: add diff_match_patch to track_changes_on_element
MyPyDavid Feb 29, 2024
85c9460
tests: fix and refactor tests for changed fields
MyPyDavid Feb 29, 2024
e142b48
chore: rename to XmlToElementsParser
MyPyDavid Feb 29, 2024
515c567
chore: update updated_and_changed meta info on element
MyPyDavid Feb 29, 2024
c282e80
js chore: resolve type casting
MyPyDavid Feb 29, 2024
cca9916
chore: update style
MyPyDavid Feb 29, 2024
f98bd2d
js: change prop on element object to .changed
MyPyDavid Feb 29, 2024
142d13b
build: add diff-match-patch==v20230430 to dependencies
MyPyDavid Feb 29, 2024
37ccc8e
js: rename to showTitle and clean up
MyPyDavid Mar 1, 2024
6fee3c5
js: update FieldsDiffs.js, add messages
MyPyDavid Mar 1, 2024
aedc594
js: add messages FieldsDiffs.js, update Warnings.js
MyPyDavid Mar 1, 2024
1933e6f
chore: add track_messages_on_element
MyPyDavid Mar 1, 2024
6352bb3
chore: fix xml legacy validation for domain
MyPyDavid Mar 4, 2024
a10cb49
refactor: rename constant models
MyPyDavid Mar 4, 2024
6802348
chore: remove up serializer arg
MyPyDavid Mar 4, 2024
d1e38ca
chore: refactor track_changes funcs and fix diff for m2m through order
MyPyDavid Mar 5, 2024
291eecb
tests: add test for update options in optionset
MyPyDavid Mar 5, 2024
887948f
refactor: use constant for diff field name
MyPyDavid Mar 5, 2024
9b62e67
tests: refactor helper function
MyPyDavid Mar 5, 2024
597cfcb
tests: fix frontend import test test_import_in_management
MyPyDavid Mar 6, 2024
cd1213f
tests e2e: add test for optionsets import and rename
MyPyDavid Mar 6, 2024
abc89d0
refactor: move RDMO_MODELS to constants.py
MyPyDavid Mar 6, 2024
a3a2fa9
fix: get the correct original instance data for through models
MyPyDavid Mar 6, 2024
3164741
tests: fix test_update_optionsets_from_changed_xml and add assertions
MyPyDavid Mar 6, 2024
ff1b8cb
chore: at import add a message for validation error on full_clean
MyPyDavid Mar 7, 2024
beab4ba
js: update import element fields
MyPyDavid Mar 7, 2024
8c139d9
tests: refactor frontend fixtures in conftest.py
MyPyDavid Mar 7, 2024
736f969
tests: re-use constant ELEMENT_DIFF_FIELD_NAME for import tests
MyPyDavid Mar 8, 2024
c200a61
js: fix import reducer selectChangedElements showChangedElements
MyPyDavid Mar 8, 2024
9eb3af9
js: add nested list for changes in sidebar
MyPyDavid Mar 8, 2024
959efd1
chore: remove unused file_path_exists
MyPyDavid Apr 4, 2024
151b27b
chore: add question util func get_widget_type_or_default
MyPyDavid Apr 5, 2024
8377923
chore: remove unused constants
MyPyDavid Apr 5, 2024
db40413
chore: refactor import helpers, add extra_field default helper
MyPyDavid Apr 5, 2024
592dbf7
chore: add question util func get_widget_type_or_default
MyPyDavid Apr 5, 2024
877afd0
chore: refactor import helpers extra fields
MyPyDavid Apr 5, 2024
20bd8ef
tests: refactor frontend import options test
MyPyDavid Apr 5, 2024
ccfb8bd
refactor: move element import diffs to react frontend
MyPyDavid Apr 9, 2024
636647e
style: make ruff and ignore long lines
MyPyDavid Apr 10, 2024
7af9211
tests: fix test iterator
MyPyDavid Apr 10, 2024
0ffa041
tests: rename e2e screenshot files
MyPyDavid Apr 11, 2024
0372a3a
chore: fix errors on element and catch MultipleObjectsReturned
MyPyDavid Apr 26, 2024
26c4c3c
js: refactor Import diff compononent into hook and utils
MyPyDavid Apr 26, 2024
b8df2d6
js draft: update sidebar
MyPyDavid Apr 26, 2024
b3fac44
chore: catch MultipleObjectsReturned at import
MyPyDavid Apr 29, 2024
043c4f5
tests frontent: add expect form-group and take screenshot before last…
MyPyDavid Apr 29, 2024
a04227f
js: update ShowUpdatedLink
MyPyDavid Apr 29, 2024
634fa5a
js: move process elements to importsReducer, update filters and sidebar
MyPyDavid Apr 29, 2024
e337d8e
chore: add space to no permissions to import message
MyPyDavid Apr 29, 2024
337bfa6
tests frontent: fix floating navigation in screenshot
MyPyDavid Apr 29, 2024
848680f
build(npm): update package-lock.json
MyPyDavid May 28, 2024
7990fad
chore: fix style and minor changes
MyPyDavid May 28, 2024
0302d61
tests(style): make rdmo.core imports absolute
MyPyDavid May 28, 2024
48fc4d2
chore(js): update styles and components for import
MyPyDavid May 29, 2024
33190de
style(scss): add styles for import and field diffs
MyPyDavid May 29, 2024
f040226
style(scss): update styles and selector for import field-diff elements
MyPyDavid Jun 3, 2024
bc3a773
chore(js): refactor Field components for import
MyPyDavid Jun 3, 2024
5cecfca
tests(fixtures): add catalog-1.xml and add change to optionset-1.xml
MyPyDavid Jun 3, 2024
06eecfc
tests(e2e): fix header info assertions in import options
MyPyDavid Jun 4, 2024
cadd245
fix: #810 fix xml import of additional_input
MyPyDavid Jun 4, 2024
d088df2
refactor: minor changes to import related functions
MyPyDavid Jun 4, 2024
e9182cb
feat(import): make import sidebar links to flat list
MyPyDavid Jun 4, 2024
e64c5fa
style(import): update selectors and css settings for import panels
MyPyDavid Jun 4, 2024
7d559ce
style(import): update scss for import
MyPyDavid Jun 5, 2024
5122c52
feat(import): update import sidebar, filter text and refactor succes …
MyPyDavid Jun 5, 2024
e7d7eb9
tests(e2e): update text selectors in import
MyPyDavid Jun 5, 2024
2e172fe
refactor(import): improve readability and move helper functions to im…
MyPyDavid Jun 5, 2024
643a5a2
refactor(import): revert xml import to functional approach and make e…
MyPyDavid Jun 6, 2024
faee015
refactor(import): update FileNotFound error handling for xml import
MyPyDavid Jun 6, 2024
9f6b0b5
tests(management): refactor and update import tests
MyPyDavid Jun 6, 2024
c1ffa80
feat(import): add build_path and build_uri to import of Attribute
MyPyDavid Jun 7, 2024
ad146d2
refactor(import): rename to ExtraFieldHelper and move strings to Impo…
MyPyDavid Jun 12, 2024
9e0eb37
feat(import): fix order elements in core/xml
MyPyDavid Jun 13, 2024
c612804
feat(import): prevent overwrite of comment and fix int, str diff for …
MyPyDavid Jun 13, 2024
8d982fb
feat(import): update import of available field
MyPyDavid Jun 13, 2024
ec3db4b
js(import): update import common components
MyPyDavid Jun 13, 2024
b0bcaf7
feat(import): update ordering of uploaded elements and refactor
MyPyDavid Jun 14, 2024
45e5b45
refactor(import): update import helper args
MyPyDavid Jun 14, 2024
9a357b8
tests(import): update and fix import tests
MyPyDavid Jun 14, 2024
41c5a3b
js(import): update and refactor import
MyPyDavid Jun 14, 2024
6210082
tests(multisite): update imports for multisite tests
MyPyDavid Jun 17, 2024
da73954
Adjust CSS in new import interface
jochenklar Jun 24, 2024
5712e2c
Adjust CSS for diff feature in new import interface
jochenklar Jun 24, 2024
9b62bda
refactor(js, import): remove extra ul from warnings
MyPyDavid Jun 26, 2024
8533368
refactor(import): update import command error comment
MyPyDavid Jun 26, 2024
5a26e8d
feat(import): update style and fix display bugs for import
MyPyDavid Jun 26, 2024
0b84b05
style(import): remove row and col- from divs in Warnings and Errors
MyPyDavid Jun 28, 2024
dae5872
style,refactor(import): display errors and warnings in list-groups
MyPyDavid Jun 28, 2024
29609cd
tests(import): add one condition that raises a warning to optionsets-…
MyPyDavid Jun 28, 2024
167cf1c
feat(import): use label-info for changed
MyPyDavid Jun 28, 2024
2b626f1
Adjust warning panel in import
jochenklar Jul 1, 2024
f82d589
Fix ImportSuccessElement component
jochenklar Jul 1, 2024
bb57561
Fix whitespaces
jochenklar Jul 1, 2024
f20109f
Adjust error panel im import
jochenklar Jul 1, 2024
b13b443
Change ShowLink to chevron
jochenklar Jul 1, 2024
a384f8d
refactor(js,import): add components for import labels
MyPyDavid Jul 1, 2024
2766b0b
feat(js,import): fix updating key for attributes at import
MyPyDavid Jul 1, 2024
f241878
fix(domain,import): use value from helper when needed
MyPyDavid Jul 1, 2024
b5a0353
feat(js, import): change label texts during import
MyPyDavid Jul 3, 2024
550aeb5
refactor(js, import): rename to buildPathForAttribute and remove extras
MyPyDavid Jul 3, 2024
fc431e5
feat(js, import): change create to new
MyPyDavid Jul 3, 2024
7649ef8
feat(import): add short_title to section and page
MyPyDavid Jul 3, 2024
f48791f
refactor(import): update created and updated, return False when error…
MyPyDavid Jul 8, 2024
7817279
feat(js,import): remove onClick from label text and add return null f…
MyPyDavid Jul 8, 2024
374fac8
feat(js,import): fix end-of-message dot at import
MyPyDavid Jul 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
603 changes: 479 additions & 124 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"react-select": "^5.7.0",
"redux": "^4.1.1",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.3.0"
"redux-thunk": "^2.3.0",
"react-diff-viewer-continued": "^3.3.1"
},
"devDependencies": {
"@babel/cli": "^7.23.4",
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ dependencies = [
"pypandoc~=1.11",
"requests-toolbelt~=1.0",
"rules~=3.3",
"diff-match-patch==v20230430",
]

[project.optional-dependencies]
Expand Down
48 changes: 10 additions & 38 deletions rdmo/conditions/imports.py
Original file line number Diff line number Diff line change
@@ -1,42 +1,14 @@
import logging

from django.contrib.sites.models import Site

from rdmo.core.imports import check_permissions, set_common_fields, set_foreign_field, validate_instance
from rdmo.core.import_helpers import ElementImportHelper, ExtraFieldHelper

from .models import Condition
from .validators import ConditionLockedValidator, ConditionUniqueURIValidator

logger = logging.getLogger(__name__)


def import_condition(element, save=False, user=None):
try:
condition = Condition.objects.get(uri=element.get('uri'))
except Condition.DoesNotExist:
condition = Condition()

set_common_fields(condition, element)

set_foreign_field(condition, 'source', element)
set_foreign_field(condition, 'target_option', element)

condition.relation = element.get('relation')
condition.target_text = element.get('target_text') or ''

validate_instance(condition, element, ConditionLockedValidator, ConditionUniqueURIValidator)

check_permissions(condition, element, user)

if save and not element.get('errors'):
if condition.id:
element['updated'] = True
logger.info('Condition %s updated.', element.get('uri'))
else:
element['created'] = True
logger.info('Condition created with uri %s.', element.get('uri'))

condition.save()
condition.editors.add(Site.objects.get_current())

return condition
import_helper_condition = ElementImportHelper(
model=Condition,
validators=(ConditionLockedValidator, ConditionUniqueURIValidator),
foreign_fields=('source', 'target_option'),
extra_fields=(
ExtraFieldHelper(field_name='relation', value=''),
ExtraFieldHelper(field_name='target_text', value=''),
),
)
1 change: 1 addition & 0 deletions rdmo/core/assets/scss/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ $footer-link-color: #999;
$footer-background-color: #001;

$danger-color: #a94442;
$warning-color: #8a6d3b;
$success-color: #5cb85c;
$modal-border-color: #e5e5e5;

Expand Down
14 changes: 14 additions & 0 deletions rdmo/core/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,17 @@
"tib": {"base": 1024, "power": 4},
"pib": {"base": 1024, "power": 5},
}

MyPyDavid marked this conversation as resolved.
Show resolved Hide resolved
RDMO_MODELS = {
MyPyDavid marked this conversation as resolved.
Show resolved Hide resolved
'catalog': 'questions.catalog',
'section': 'questions.section',
'page': 'questions.page',
'questionset': 'questions.questionset',
'question': 'questions.question',
'attribute': 'domain.attribute',
'optionset': 'options.optionset',
'option': 'options.option',
'condition': 'conditions.condition',
'task': 'tasks.task',
'view': 'views.view'
}
55 changes: 55 additions & 0 deletions rdmo/core/import_helpers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
from dataclasses import dataclass, field
from inspect import signature
from typing import Callable, Iterable, Optional, Sequence, Union

from django.db import models

ELEMENT_COMMON_FIELDS = (
'uri_prefix',
'uri_path',
'comment',
)

@dataclass(frozen=True)
class ThroughInstanceMapper:
field_name: str
source_name: str
target_name: str
through_name: str


@dataclass(frozen=True)
class ExtraFieldHelper:
field_name: str
value: Union[str, bool, int, None] = None
callback: Optional[Callable] = None
overwrite_in_element: bool = False

def get_value(self, **kwargs):
if self.value is not None:
return self.value
elif self.callback is not None:
return self.get_value_from_callback(self.callback, kwargs)

@staticmethod
def get_value_from_callback(callback, kwargs):
sig = signature(callback)
kwargs = {k: val for k, val in kwargs.items() if k in sig.parameters}
value = callback(**kwargs)
return value


@dataclass(frozen=True)
class ElementImportHelper:
model: Optional[models.Model] = field(default=None)
model_path: Optional[str] = field(default=None)
validators: Iterable[Callable] = field(default_factory=list)
common_fields: Sequence[str] = field(default=ELEMENT_COMMON_FIELDS)
lang_fields: Sequence[str] = field(default_factory=list)
foreign_fields: Sequence[str] = field(default_factory=list)
extra_fields: Sequence[ExtraFieldHelper] = field(default_factory=list)
m2m_instance_fields: Sequence[str] = field(default_factory=list)
m2m_through_instance_fields: Sequence[ThroughInstanceMapper] = field(default_factory=list)
reverse_m2m_through_instance_fields: Sequence[ThroughInstanceMapper] = field(default_factory=list)
add_current_site_editors: bool = field(default=True)
add_current_site_sites: bool = field(default=False)
Loading
Loading