Django - Creating an if statement based on the request path : not working
<p>I'm trying to create a div within my view that should only be generated if both the words 'org' and 'dashboard' are in the page URL. I've looked at other similar questions on SO but they the solutions don't seem to work for me.</p>

<p>I have also tried putting the phrases org and dashboard within quotation marks which will actually display the div on the page; however this will be displayed on the page regardless of whether those phrases are in the page URL.</p>

<p>HTML:    </p>

<pre><code>{% if org and dashboard in request.path %}
    &lt;div id='url-req-brn'&gt;
      &lt;div class='max margins'&gt;
        &lt;h4 id='url-req-brn-h4'&gt;You must be logged in to view the requested page.&lt;h4&gt;
      &lt;/div&gt;
    &lt;/div&gt;
{% endif %}
</code></pre>

<p>Thanks</p>

<p><strong>Update:</strong>
Current solutions provide clarity as to the mistake I made in the HTML, however the div still doesn't display when I have a URL containing 'org' and 'dashboard'. </p>

<p>Do I have to define what 'request.path' means in my views.py file?</p>