django中配置favicon.ico
django 返回某个静态文件的:
from django.contrib.staticfiles.views import serve urlpatterns = [ ... path('favicon.ico', serve, {'path': 'img/favicon.ico'}), ]
django 返回某个静态文件的:
from django.contrib.staticfiles.views import serve urlpatterns = [ ... path('favicon.ico', serve, {'path': 'img/favicon.ico'}), ]