Picture path not found
1、 Create a... In the root directory of the project media Catalog
2、 Add the following content to the main route :
urlpatterns = [
path('admin/', admin.site.urls),
# Add... To the main route MEDIA_ROOT The interview of
re_path(r'^media(?P<path>.*)$', serve, {'document_root':settings.MEDIA_ROOT})
]
3、 stay settings Add the following to the configuration file
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')