A

Admin • 828.03K Points
Coach

Q. What does the auto_now_add attribute in a DateTimeField do?

  • (A) Automatically updates the field every time the object is saved
  • (B) Sets the field to now when the object is first created
  • (C) Adds the current time to all records
  • (D) Updates the time daily
  • Correct Answer - Option(B)
  • Views: 11
  • Filed under category Django
  • Hashtags:

Explanation by: Admin
auto_now_add sets the field to the current date/time when the object is created.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.