The official docs explain how to automatically adds assets for certain widgets., from thier example:
from django import forms
class CalendarWidget(forms.TextInput):
class Media:
css = {
'all': ('pretty.css',)
}
js = ('animations.js', 'actions.js')
What it does not describe is how to make JS assets deferred or async loaded, e.g.
<script defer src="https://myserver.com/static/animations.js">/script>