Skip to content

Conversation

haricot
Copy link

@haricot haricot commented Nov 20, 2019

Hoping it is a right approach !
For proof of concept, I will do a PR about this with Djangocms-cascade.

@haricot
Copy link
Author

haricot commented Nov 26, 2019

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.

@haricot
Copy link
Author

haricot commented Nov 26, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant