After init of the form, is it impossible to modify the media js list?

I want to modify form.Media according to the received arg without setting it in advance.

After super().__init__(), self.media._js and self.media._js_lists are checked in self.media.__dir__().
However, neither of them could be modified or added.

Is it impossible to fix this??

See the docs for Media as a dynamic property, and the related sections for Media on Forms, I believe that would allow you to customize its configuration based upon what exists within the form.

Your answer is not helpful.

A solution I found myself.
The form’s media is provided as a property, and a new Media class is created each time it is called.

Therefore, if you want to do this, you need to add a Media class to the form and override the action to be performed when calling the media property.

Additionally, the Media class used in the form uses Media from widgets.py, and writing a Media class within a form as mentioned in the Django document is a method of overriding and using the variable of the Media class.

When using {{ form.media }} in a template, the self.render() method connected to self.__str__() is used.