es6-modules

How to add script type="module" in django admin

How to add script type="module" in django admin Question: If I want some javascript functionality in my Django admin, I usually go about it using the Media class like this: @admin.register(MyModel) class MyModelAdmin(admin.ModelAdmin): class Media: js = (‘js/my_script.js’,) But I now have a script that is a ES6 module so I would like Django to …

Total answers: 4