Hi, I have the following model which have a datetime field with default value=datetime.now()
from datetime import datetime
class ATable(BaseModel):
time = DateTimeField(default=datetime.now())
customer = CharField()
Surprised when I create several records say:
ATable.create(customer='A')
# some delay
ATable.create(customer='B')
# some delay
ATable.create(customer='C')
The time (default) filled values was all the same: 2011-12-28 21:30:38.257 on all records
The time beeween record creation surelly in different time, at least microsecond and or second value
Hi, I have the following model which have a datetime field with default value=datetime.now()
Surprised when I create several records say:
The time (default) filled values was all the same: 2011-12-28 21:30:38.257 on all records The time beeween record creation surelly in different time, at least microsecond and or second value
Perhaps a caching issue?
Thanks