Django model field validation without a custom form
问题 I am using a django DateField in my model. class CalWeek(models.Model): start_monday = models.DateField(verbose_name="Start monday") I have a custom validation method that is specific to my modelField: I want to make sure that it is actually a Monday. I currently have no reason to use a custom ModelForm in the admin--the one Django generates is just fine. Creating a custom form class just so i can utilize the clean_start_monday(self) 1 sugar that django Form classes provide seems like a lot