fieldName = models.DateTimeField(auto_now=False, auto_now_add=False)

      Python language logo
      your recipe card header background
      DateTime Field

      Django Public Recipes

      This code creates a new DateTimeField object. The auto_now and auto_now_add options determine how the DateTimeField object behaves. The auto_now_add option allows the field to automatically update its value when a new date and time is entered into the field. The auto_now option causes the field to always use the current date and time as its value.

      Shortcut: django.field.datetime

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.