In Django, we can use these 2 parameters when creating a date column:
DateField.auto_now Automatically set the field now every time the object is saved. Useful for timestamps with the latest change. Note that the current date is always used; it is not only the default value that you can override.
DateField.auto_now_add. Automatically set the field now when the object is first created. Useful for creating timestamps. Note that the current date is always used; it is not only the default value that you can override.
How to do it in SQLAlchemy?
python date django sqlalchemy
zchenah
source share