阅读背景:

Django:获取字段属性DateTime值

来源:互联网 

I am trying to iterate over a model's attributes, getting both the verbose name and value for each attribute. I have no problem for character/numerical values, but I am struggling with DateTime values. Of course I can do this manually, but some of my models have dozens of attributes (only a few of which are DateTimes), so it would be nice if I could figure out how to do this programatically. I am trying to iterate over a model's attribute




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

分享到: