#6724 (A default value for SiteConfigs.detail_layout)
by Luc Saffre · in Developers · assigned to Luc Saffre
Summary
The SiteConfig model often a series of fields that are injected by optional plugins. For example react injects "primereact_theme", or calview injects "default_color". The default_build_method should theoretically get injected by the printing plugin. This currently means that every application needs to specify the detail layout of their SiteConfig. Can't we set the detail_layout of SiteConfigs to "*"?
Children
Comments
- 6 months, 2 weeks ago by Luc Saffre about #6724 (A default value for SiteConfigs.detail_layout) : I optimized my change by wrapping the "*" into a SiteConfigDetail class. This is for welfare, where we have a tabbed detail view for SiteConfig. BEfore this optimization welfare had two different detail layouts for SiteConfig (SiteConfig.detail and MySiteConfig.detail).
- 6 months, 2 weeks ago by Luc Saffre about #6724 (A default value for SiteConfigs.detail_layout) : And in many applications (amici, avanti, cosi, voga, tera, ...) I now removed the code that was calling SiteConfigs.set_detail_layout().
- 6 months, 2 weeks ago by Luc Saffre about #6724 (A default value for SiteConfigs.detail_layout) : And even better: I removed the ugly code in lino_noi.lib.noi.models where we kind of desperately were trying to decide how the detail layout should look, depending on which site options where activated or not: @dd.receiver(dd.post_analyze) def my_details(sender, **kw): ... sender.models.system....
- 6 months, 2 weeks ago by Luc Saffre about #6724 (A default value for SiteConfigs.detail_layout) : Especially the primereact_theme field was missing in the detail layout for all these applications.
- 6 months, 2 weeks ago by Luc Saffre about #6724 (A default value for SiteConfigs.detail_layout) : Answer: yes we can! And for simple applications this brings acceptable results. I tested in chatter and polly and cosi.
- 6 months, 2 weeks ago by Luc Saffre about #6724 (A default value for SiteConfigs.detail_layout) : Created new Ticket #6724 (Defining the SiteConfigs.detail_layout).