django模板中获取域名地址

获取域名:
{{ request.get_host }}

获取路径:
{{ request.path }}

获取协议
{{ request.scheme }}

猜你喜欢

转载自www.cnblogs.com/huim/p/10268336.html
今日推荐