While using a class-based view like:
from django.views.generic.edit import CreateView
from myapp.models import MyModel
class MyModelCreateView(CreateView):
model = MyModel
How can I define custom CSS and JavaScript to be loaded by {{ form.media }} in the myapp/mymodel_form.html template?
I could set the form_class attribute and use the Media subclass, but I'm wondering if there's direct way without creating more classes.