我一直在尝试找出如何从manifest.json中为Django加载图标。
{
"short_name" : "Ct",
"name" : "CTAI",
"icons" : [
{
"src" : "img/black.png",
"type" : "image/png",
"sizes" : "512x512"
}
],
"start_url" :"",
"background_color" : "#ffffff",
"display" : "fullscreen",
"theme_color": "#172435",
"scope" : "/",
"orientation": "potrait"
}
以及settings.py中django的清单设置
PWA_APP_NAME = 'Ct'
PWA_APP_DESCRIPTION = "The dashboard for all you're needs."
PWA_APP_THEME_COLOR = '#172435'
PWA_APP_BACKGROUND_COLOR = '#ffffff'
PWA_APP_DISPLAY = 'fullscreen'
PWA_APP_START_URL = '/'
PWA_APP_ICONS = [
{
'src': '/black.png',
'sizes': '512x512'
}
]
但是我收到此错误。
Error while trying to use the following icon from the Manifest: http://127.0.0.1:8000/ (Download error or resource isn't a valid image)
在开发工具的“应用程序”选项卡中,manifest.json似乎已损坏。我给的设置和这里的设置完全不同。 The dev tools showing the manifest.json
我要去哪里错了?
编辑:我正在关注this。