【发布时间】:2010-11-10 19:00:52
【问题描述】:
我有一个 Django 项目使用 https 作为 url 的某些部分(/account/、/admin/、/purchase/)。
当以 https 模式在此页面之一上时,所有相对内部链接 {% url foo %} 将指向 https://my_url。
但是我不想让这些页面显示为 https :home, contacts ...
这种需求有什么解决方案?
强制执行绝对网址?
http://{{ domain }}{% url foo %}
不太好。
【问题讨论】: