#34864: Add ability to customise script tags for form media
               Reporter:  Tom Carrick  |          Owner:  nobody
                   Type:  New feature  |         Status:  new
              Component:  Forms        |        Version:  dev
               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            |
 It would be useful to be able to add `defer`, `integrity`,
 `type="module"`, etc. onto the script tags generated by form media.

 I couldn't find a way to do this currently. Perhaps something like this:

 class MyForm(forms.Form):
     class Media:
         js = [
             {"src": "js/foo.js", "defer": True, "type": "module"},

 Not sure if we should allow arbitrary stuff to be added or just choose the
 options that are reasonable

Ticket URL: <https://code.djangoproject.com/ticket/34864>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Reply via email to