Django - 上傳文件(初稿)

 views:

 

 

template:

 

#############################3

<html>
<head>
    <title>Upload File</title>
</head>
<body>
    {% if error %}
        <p style="color: red;">
           There are something error.
        </p>
    {% endif %}
    {% if up %}
            <p>Welcome to UPLOAD FILE SYSTEM.</p>
    {% endif %}
    <form enctype="multipart/form-data" action="" method="post">
        upload file: <input type="file" name="file" maxlength=100 />
        &nbsp;&nbsp;
        <input type="submit" value="Upload" />
    </form>
</body>
</html>

##############################

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章