from django.db import models
from datetime import datetime
class Coral (models.Model):
add_time = models.DateTimeField(default=datetime.now, verbose_name="")
month = models????
for example, the value above me has two word breaks, and the second field is the month.
when I enter data in the background, can I enter only the first piece of add_time data? after submission, month automatically obtains the months in the add_time, eliminating the step of entering month data.
remember reading and writing a method or something before?
Thank you.