-1

I have the date in the model as such but when I POST it always just returns the time of when I ran the server and not the current time of the post

class UserPost(models.Model):

    user = models.ForeignKey(User_profile, on_delete=models.CASCADE)
    h_body = models.CharField(max_length=140)
    post_date = models.DateTimeField(default=datetime.now())

0 Answers0