相关疑难解决方法(0)

Pythonanywhere,如何使用静态文件?网址是什么?

我是Pythonanywhere的新手,我无法弄清楚为什么静态文件没有加载...这是我存储css和图像的路径,即static/images/wikiLang.png等等

/static/admin/  /usr/local/lib/python2.7/dist-packages/django/contrib/admin/media    
/static/        /home/saadfast/WikiWorld/static  
/media/         /home/saadfast/WikiWorld/media
Run Code Online (Sandbox Code Playgroud)

在客户端,我应该如何使用URL?

我做了什么search.html:

<div id="TopheaderImg">
  <img src="/home/saadfast/WikiWorld/static/images/wikiLogo.png" width="100px" style="float:middle"/>
  <br />
  <img src="/home/saadfast/WikiWorld/images/wikipediaLang.png" width="100px" style="float:middle"/>
</div>
Run Code Online (Sandbox Code Playgroud)

为什么图像没有加载?路径或URL应该是什么?

python django pythonanywhere

4
推荐指数
1
解决办法
3612
查看次数

标签 统计

django ×1

python ×1

pythonanywhere ×1