Skip to content

How to display/use delete button on preview? #86

Answered by EduardoJM
sheckathorne asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for the comment. The delete button is shown when the field is not required into the django form. To made the field not required, add null=True, blank=True to the ImageField, like it:

class TestNonRequiredInlineItem(models.Model):
    # ...
    image = models.ImageField('Image', null=True, blank=True)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by EduardoJM
# for free to join this conversation on GitHub. Already have an account? # to comment
Category
Q&A
Labels
None yet
2 participants