I want to see if a field/variable is none within a Django template. What is the correct syntax for that?
This is what I currently have:
{% if profile
{% if profile.user.first_name %} works (assuming you also don't want to accept '').
{% if profile.user.first_name %}
''
if in Python in general treats None, False, '', [], {}, ... all as false.
if
None
False
[]
{}