title: Django template link with if else statement
body: <p>Lets say I have code in template like this:</p>
  
  <pre><code>&lt;a href="#"&gt;
      {% if request.user.first_name or request.user.last_name %}
          {{ request.user.first_name }} {{ request.user.last_name }}
      {% else %}
          {{ request.user }}
      {% endif %}
  &lt;/a&gt;
  </code></pre>
  
  <p>Problem with this code is that it adds trailing space to link, so link looks like <em>link</em>_ with underline at the end.</p>
  
  <p>How do I remove such trailing spaces? <code>{% spaceless %}</code> tag doesn't quite help here because it only removes spaces between tags.</p>