阅读背景:

Django Forms - 在视图中设置字段值

来源:互联网 

I have a model which represents a work order. One of the fields is a DateField and represents the date the work order was created (aptly named: dateWOCreated). When the user creates a new work order, I want this dateWOCreated field to be automatically populated with todays date and then displayed in the template. I have a few other fields that I want to set without user's intervention but should show these values to the user in the template.I have a model which represents a work order. O




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: