#33241: support for script type="module" in django admin Form Media
-------------------------------------------+------------------------
               Reporter:  Thomas Grainger  |          Owner:  nobody
                   Type:  Uncategorized    |         Status:  new
              Component:  Uncategorized    |        Version:  3.2
               Severity:  Normal           |       Keywords:
           Triage Stage:  Unreviewed       |      Has patch:  0
    Needs documentation:  0                |    Needs tests:  0
Patch needs improvement:  0                |  Easy pickings:  0
                  UI/UX:  0                |
-------------------------------------------+------------------------
 I'd like to be able to add ESM modules to my Forms and Widgets eg:


 {{{

 @attr.frozen
 class JS:
     type: Literal["application/json", "module"] = "application/json"
     src: str

 @admin.register(MyModel)
 class MyModelAdmin(admin.ModelAdmin):

     class Media:
         js = (JS(type="module", src='js/my_script.js'),)

 }}}


 see also https://stackoverflow.com/questions/56232944/how-to-add-script-
 type-module-in-django-admin

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33241>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.6e9ea28e2277bc1b8134fae25f1d72f5%40djangoproject.com.

Reply via email to