我想看看Django模板中的字段/变量是否为空.这个的正确语法是什么?
这就是我目前拥有的:
{% if profile.user.first_name is null %}
<p> -- </p>
{% elif %}
{{ profile.user.first_name }} {{ profile.user.last_name }}
{% endif%}
Run Code Online (Sandbox Code Playgroud)
在上面的例子中,我将用什么来代替"null"?