A

Admin • 802.91K Points
Coach

Q. Which option defines a model field that automatically adds the current timestamp on creation?

  • (A) created_time=True
  • (B) auto_created=True
  • (C) auto_now_add=True
  • (D) datetime=True
  • Correct Answer - Option(C)
  • Views: 9
  • Filed under category Django
  • Hashtags:

Explanation by: Admin
auto_now_add=True automatically sets the field to now when the object is created.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.