老师你好,我想在modelform中提交当前系统时间,但是怎么都提交不上去,代码如下
class PrintForm(forms.ModelForm):
# pub_date = timezone.now()
class Meta:
model= PrintForm
fields = ['repair_man', 'unit', 'content', 'telephone', 'pub_date']
labels = {
'pub_date': '2018-12-04 11:50:00',
}
我应该怎么做呢