How to check if this is an index page in Django?

How to check current page on index page in Django template?

{% if What Goes Here??? %} // whatever {% endif %} 
+4
source share
2 answers

You can simply add your code template to the index page template itself.

-2
source
 TEMPLATE_CONTEXT_PROCESSORS = ( 'django.core.context_processors.request', ... ) {% if request.path == "/" %} ... {% endif %} 
+10
source

All Articles