The latest version of xadmin modifies the model data. There are already pictures, and pictures are required to be uploaded.

clipboard.png

the following is the image field in xadmin background management. I already have a picture.
when I want to save my changes, I will be prompted to upload a picture. How can I change this bug?

Mar.28,2021

Thank you. This is not bug, but the model will default that this value is required. If you want to allow it not to set and retain the original value, you can add an option of blank=True to your model, for example:

image = models.ImageField(upload_to='upload/%Y/', blank=True, null=True, default='user_default.png')

has the problem of landlord been solved? ask for sharing. I think this field is required.

Menu