I use the SelectDateWidget widget to enter a date in the form field. But I want her to show the current date by default. How can i do this?
# modely.py
bdate = models.DateField(default=datetime.date.today())
This gives an error. can anyone tell the right way to do this?
Also my template
{{ form.bdate }}
when I use the above line in my template, it displays as - - - but I want something like this month of the year date . How can i do this?
My form:
widgets = { 'bdate' : SelectDateWidget(), }
source share