S
S
s_katala2018-05-21 12:21:56
Django
s_katala, 2018-05-21 12:21:56

How to display a div only on a specific page?

How to display a div only on a specific page?
for example now I output the block like this

{% if request.path == '/test/' %}
 <div class="class">
    Содержимое
 </div>
{% endif %}

How to do the opposite? display everywhere except the test page

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Kitaev, 2018-05-21
@s_katala

lol
{% if request.path != '/test/' %}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question