django-entangled
django-entangled copied to clipboard
Preserve entangled fields deepcopy with nested lists and tuples for have vertical or horizontal fieldsets capability
Hoping it is a right approach ! For proof of concept, I will do a PR about this with Djangocms-cascade.
if not more simply by changing the template_name attribute of each widget as in the cascade plugin https://github.com/jrief/djangocms-cascade/blob/29e7357cccec5a0e78f1498a95aef9ca7ce53e96/cmsplugin_cascade/bootstrap4/container.py#L31 it would be the same result, with more customization possible. I think close this PR, which is not necessarily necessary suddenly.
After reflextion this is very convenient instead of overloaded all the template_name attributes needed for some widgets, it follows the logic of the django fieldsets. With a little logic it allows to have 3 choices possibllity different custom fieldsets to choose from:
['glossary', 'somefields', 'somefields']
['glossary', ['somefields', 'somefields']]
(None, {
'classes': ('custom_help',),
'fields': (
('some_fields'),('some_fields1'), ('some_fields2')
),
}),
So I am rather for. I think that it avoids multiplying the number of template widget varitions or another logic custom.