Answer the question
In order to leave comments, you need to log in
Error saving entry when using default=timezone.now?
from django.db import models
from django.utils import timezone
import pytz
# Create your models here.
class Bb(models.Model):
title = models.CharField(max_length = 5)
content = models.TextField(null = True, blank = True)
price = models.FloatField(null = True, blank = True)
published = models.DateTimeField(default=timezone.now, db_index = True)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question