Answers for "The options auto_now, auto_now_add, and defa ult are mutually exclusive. Only one of these options may be present."

0

The options auto_now, auto_now_add, and defa ult are mutually exclusive. Only one of these options may be present.

class Users(models.Model):
    ctime = models.DateTimeField(auto_now_add=True)
    uptime = models.DateTimeField(auto_now=True)


# It will work.
# Explanation:
# These both are mutually exclusive means you should use only one of them, not both.
Posted by: Guest on October-09-2021

Python Answers by Framework

Browse Popular Code Answers by Language