图片上传首先要是设置settings.py文件(与静态文件设置类似) MEDIA_ROOT = os.path.join(BASE_DIR,'media')MEDIA_URL = '/media/' 1.需要用到imagekit软件安装使用imagekit需要以下三步:1)Install PIL or Pillow. (If you’re using an ImageField in Django, you should have already done this.)2)pip install