第一步: pip install django-cleanup 第二步: INSTALLED_APPS = ( 'django_cleanup.apps.CleanupConfig',) 恭喜你,成功解决这个问题