About Populating the DateField Value For Fields with auto_now_add
In order to set a value for a DateField
field with auto_now_add
attribute, you'll have to update the entry with the QuerySet's update()
method after creating it:
1 2 3 4 5 6 7 8 |
|
Tips and Tricks Programming Django 4.2 Django 3.2 Django 2.2
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django GDPR Cookie Consent app
For Django websites that use cookies.