【发布时间】:2021-07-21 20:35:04
【问题描述】:
关于在 django 中创建指向外部网站的超链接,例如在 google.com 中,我有一个小问题 我的 html 文件中有类似的内容:
Adres www: <a href="{{ det_wpisu.adres_www }}">{{ det_wpisu.adres_www }}</a> <br />
但是当我点击显示我时的 www 地址:
http://localhost:8000/detale/3/www.google.com
并返回 404 页面。
【问题讨论】:
-
你的 html 中的值是什么?如果您没有在链接前添加
http://可能是正常的
标签: django django-templates href