[Fixed]-Django – Creating an if statement based on the request path : not working

1👍

You’ll have to quote org and dashboard as strings, and then test their containment separately:

{% if 'org' in request.path and 'dashboard' in request.path %}

The syntax follows that of plain Python.


Reference

Template complex expressions

Leave a comment