from django.db import modelsfrom datetime import datetime
class Coral( models.Model ):
add_time = models.DateTimeField(default=datetime.now, verbose_name="添加时间")
month = models????
For example, I have a two character value above, and the second field is month. When I input data in the background, can I just input the first add time After the data is submitted, month automatically gets the add time In the month, the steps of inputting month data are omitted. Do you remember reading a method or something before? thank you.