How can I check of the present page is the index page in a Django template?
{% if What Goes Here??? %}
// whatever
{% endif %}
TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.request',
...
)
{% if request.path == "/" %}
...
{% endif %}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With