I have a base template, and every other template extends from it. but the base.html, how can I set the data in it?
This is code snippet of base.html:
...
<li class="dropdown bell">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class=" fa fa-user-circle"></i>191457****@qq.com</a>
<ul class="dropdown-menu nav-menu">
...
I want to change the 191457****@qq.com
to the passed data, it should be flexible, variable, that is take out from database. There is static html now.
I tried in every template to set it, but you know this is a lot of repetition operation, if there is a simple method, I think python will be worthy of the name.