In my models.py
from_date = models.DateField(auto_now=False,auto_now_add=False)
to_date = models.DateField(auto_now=False,auto_now_add=False)
My csv has
In my views.py Im inserting the data from csv
reader = csv.DictReader(csvf)
for row in reader:
Csv.objects.create(from_date=row['from'],to_date=row['to'])
Django is throwing me an error,"the date should be It must be in YYYY-MM-DD format." Is there any way to change the date format in django models directly with out Django Model Forms ?
