Conditions in Django Box, remove Div only to the main



  • Good afternoon, please tell me how to put div in the Django template only on the main page of the website. I think there must be a condition in the template.

    Thank you so much.



  • Do you have one common template on all the pages now? If so, you have at least two options: to supplement (extend) the base template with a template for the front page; or to control the context transmitted for the front page.

    References {% extends %}

    • http://www.tangowithdjango.com/book/chapters/templates.html
    • http://tutorial.djangogirls.org/en/template_extending/index.html

    A more detailed question was needed for a better answer.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2