随笔分类 -  django

python 页面表格 在word文档中显示
摘要:def post(self, request): base_url = settings.MEDIA_ROOT + '\\doc\\template\\' asset_url = base_url + 'kong3.docx'# ---------------------------cp_name--cp_ids-------------------------... 阅读全文
posted @ 2019-05-28 18:43 洋槐 阅读(672) 评论(0) 推荐(0)
Django model select 各种查询
摘要:https://mp.weixin.qq.com/s/JVh4UnS2Tql9gUVaBSoGuA 阅读全文
posted @ 2019-05-24 16:40 洋槐 阅读(207) 评论(0) 推荐(0)
model
摘要:1对多 在多的表添加外键,设置外键值为空:images = models.ForeignKey(Images, verbose_name="图片",null=True) 排序: 正序排列的方法:report.objects.order_by("endtime"),倒序排列的方法:report.obj 阅读全文
posted @ 2019-05-24 14:40 洋槐 阅读(144) 评论(0) 推荐(0)