django如何给上传的图片重命名(给上传文件重命名)
摘要:
1、先在你项目中添加一个文件夹如:system 在文件夹下添加__init__.py 和storage.py文件,并在storage.py中添加如下代码: 2、在models.py文件中添加如下代码: 3、这样就解决了问题,效果如下: 阅读全文
posted @ 2017-05-23 17:10 星河赵 阅读(6397) 评论(0) 推荐(1) 编辑
posted @ 2017-05-23 17:10 星河赵 阅读(6397) 评论(0) 推荐(1) 编辑
posted @ 2017-05-23 13:52 星河赵 阅读(458) 评论(0) 推荐(0) 编辑
posted @ 2017-05-23 12:13 星河赵 阅读(2242) 评论(0) 推荐(0) 编辑