在Django模板中截取request.post返回的字符串
我想在一个模板中截取由 request.post
返回的字符串:
比如说:
我访问了这个网址 /foo/bar/long/
,现在
{% if request.path[:8] == '/foo/bar' %}...{endif}
应该是对的。
我想在一个模板中截取由 request.post
返回的字符串:
比如说:
我访问了这个网址 /foo/bar/long/
,现在
{% if request.path[:8] == '/foo/bar' %}...{endif}
应该是对的。