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.

For example:

my_year = models.DateField(null=True, blank=True)

Comments

Popular posts from this blog

Whitelist an Azure firewall IP using PowerShell

Excel: highlighting a row or a column based a value, the current date example.