I have this code in my model:
added_time = models.DateTimeField(
default=datetime.datetime.now()
)
After I migrate and restart uwsgi, I get first datetime in MariaDB now, and all next - exactly the same as first after resetting uwsgi.
2015-04-19 16:01:46
2015-04-19 16:01:46
2015-04-19 16:01:46
2015-04-19 16:01:46
I fixed it by changing code to:
added_time = models.DateTimeField(
auto_now_add=True
)
Though I fixed the problem, I'm not really sure why there even was such behavior?