'django model form initial instance does not add images
hi guys I am trying to set up a simple model form that has some instance as initial values, I have an image field and it causes problems because it is required, and the initial value is empty, I know I could get around it by setting it to not required and validating it in a custom validation but I was wondering if there was a simpler way or maybe a library to this
this is my form
class adminPackageForm(forms.ModelForm):
class Meta:
model = package
fields = ("__all__")
and I am rendering it using the crispy tailwind theme
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
