Make clicked tab active in Bootstrap

后端 未结 10 630
傲寒
傲寒 2021-01-31 09:02

I am using Django and integrated Bootstrap with Django. Here is my HTML code for the navigation bar:

10条回答
  •  北海茫月
    2021-01-31 09:40

    If you dont want to send any additional context from views then you can handle it like this with resolver_match:

  • HOME
  • where 'home' is the name given to your url pattern for / (probably '^$') in your urls.py. So obviously to use this you need to name all your url patterns, which is a good practice anyway.

提交回复
热议问题