[Answered ]-Django – AdminDateWidget

2👍

You can read about form validations here:

https://docs.djangoproject.com/en/dev/ref/forms/validation/

Here is a suggestion:

class MyForm(forms.Form):

    def clean_insertion_date(self):
        if self.cleaned_data['insertion_date'] > date.today():
            raise forms.ValidationError("Time travel are we?")

Leave a comment