I have an image upload form that takes a title and a file for its field. I have two uses for it. Most of the time I call it, I need both a title and the image itself. But when I call it simply to grab a thumbnail, I don’t need the title. In fact, the form data is saved to a different model that doesn’t even have title as a field.
Is there a way to suppress the “title” field when I call the form? I could create two form classes in my forms.py, but this seems unnecessarily repetitious.
Write a constructor for the form class