导航

2016年5月6日

摘要: The simpliest way to retrieve data from tables is take them all. To do this, you can write: 1 all_entries = Entry.objects.all() 1 all_entries = Entry. 阅读全文

posted @ 2016-05-06 19:11 网名还没想好 阅读(459) 评论(0) 推荐(0) 编辑

摘要: 问题场景: 在django admin models 实体对象添加一个属性最后修改时间,用户在添加、修改是系统自动修改操作时间。 UpdateTime自动获取系统时间、并且自动修改。 代码设置如下。 class User(models.Model): Name = models.ForeignKey 阅读全文

posted @ 2016-05-06 16:19 网名还没想好 阅读(469) 评论(0) 推荐(0) 编辑