标签: python django django-templates
尝试在我的模板中创建if语句。我怎么告诉django {% if request.get_full_path|stringify *ends in a number* %}?所以get_full_path字符串就像/news/324/。这应该等于if语句中的True。 {% else %}只是一个字符串:/news/
{% if request.get_full_path|stringify *ends in a number* %}
get_full_path
/news/324/
True
{% else %}
/news/
我是否可以这样做?