python的django写页面上传文件以及遇到的问题

python的django写页面上传文件以及遇到的问题

首先上结构

mynode -> app5 -> urls.py & views.py

            | -> templates -> 5 -> upload.html

            | -> mynode -> urls.py

            | -> media

按照顺序,先上app5/urls.py

from django.urls import path
from app5 import views as v5

app_name = "app5"

urlpatterns = [
path("upload_file/", v5.upload_file, name = "upload_file"),
path("show_upload/", v5.show_upload, name = "show_upload"),
]
hmoban主题是根据ripro二开的主题,极致后台体验,无插件,集成会员系统
自学咖网 » python的django写页面上传文件以及遇到的问题