这是我的代码:
{% if {{post.author.profile.image.url}} is None %}
当我运行这段代码时出现错误
Could not parse the remainder: '{{post.author.profile.image.url}}' from '{{post.author.profile.image.url}}'
如何解决?以及如何在模板标签内使用模板标签
请您参考如下方法:
直接使用表达式的值,不要用大括号括起来:
{% if post.author.profile.image.url is None %}
...
{% endif %}
