This is the error that I am facing when I try to run migrate or runserver or any command. Please Help.
"raise ValueError(f'Invalid isoformat string: {date_string!r}')"
I am facing this error since I upgraded my python to version 3.7.
Models.py:
from django.db import models
from datetime import datetime
# Create your models here.
class Posts(models.Model):
title = models.CharField(max_length=200)
body = models.TextField()
created_at = models.DateTimeField(default=datetime.now, blank=True)
def __str__(self):
return self.title
class Meta:
verbose_name_plural = "Posts"