On Mon, Feb 25, 2019 at 10:39 PM Jamesie Pic <j...@yourlabs.org> wrote: > component = dict( > template_name='django/forms/widgets/textarea.html', > script='your/textarea.js', > style='your/style.css' > )
Actually do NOT try this, for static i think the more efficient refactor would be to enable widgets and things to touch request.static.scripts and request.static.styles, so that scripts that you load in your parent template would not be re-added by the widgets. At the same time, programing perimeter for widget statics would increase since this would no more reduce it to a declarative structure. And maybe you want to try to change from templates to python rendering functions, if not for transpiling or performance, performance, maybe just for easier reuse across python code in general. But then you would use a python library that FTR GDAPS is also having research on this as we speak : https://gitlab.com/nerdocs/gdaps/issues/2 Have fun -- ∞ -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAC6Op18G0897i333BgRmcOur5bGGceuAy7ak6XN%3DZ2rmOuW7MQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.