viewer_tools.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:FormShare 作者: qlands 项目源码 文件源码
def django_file(path, field_name, content_type):
    # adapted from here: http://groups.google.com/group/django-users/browse_th\
    # read/thread/834f988876ff3c45/
    f = open(path)
    return InMemoryUploadedFile(
        file=f,
        field_name=field_name,
        name=f.name,
        content_type=content_type,
        size=os.path.getsize(path),
        charset=None
    )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号