Django: Avoid "This field is required." message in the custom admin view.
Problem:
Avoid "This field is required." message in the custom Django admin view when trying to save an object.
Solution:
blank=True for the corresponding field in models.py will allow you to save an object without that field filled in when trying to save an object.
Avoid "This field is required." message in the custom Django admin view when trying to save an object.
Solution:
blank=True for the corresponding field in models.py will allow you to save an object without that field filled in when trying to save an object.
For example:
my_year = models.DateField(null=True, blank=True)
Comments
Post a Comment