title: django hide the sidebar/nav conditionally in the templates
body: <p>I'm thinking of the best way to conditionally hide divs using Django. My guess is there is an elegant solution within the template language I'm not seeing. I can write a list and do a request.path not in maybe, but an indicator from the view or, even better, some better templating would be preferable. Any suggestions?</p>
  
  <p>base.html</p>
  
  <pre><code>&lt;body&gt;
      {% include "header.html" %}
      &lt;div id="wrapper"&gt;
          {% ifnotequal request.path '/accounts/login/' %}
              {% include 'leftpane.html' %}
          {% endifnotequal %} 
          &lt;div id="main"&gt;
          {% block content %}{% endblock %}
          &lt;/div&gt;
      &lt;/div&gt; 
      {% include "footer.html" %}
  &lt;/body&gt;
  </code></pre>