Template includes and django views/urls. How (do/should) they work?

前端 未结 1 951
無奈伤痛
無奈伤痛 2021-01-27 18:07

I have a mini box that pops up when hovered to reveal profile information(constantly being hidden). It\'s working due to a template include:

{% for i in leftbar_         


        
相关标签:
1条回答
  • 2021-01-27 18:29

    I want to add some conditions and pull other information... for instance: check if they can be messaged. pull that specific profiles friend count

    Sounds like your are looking for a template tag, for an inclusion tag, to be more specific.

    So you can put the (python/view) logic in your tag and render the appropiate html similiar to your include.

    0 讨论(0)
提交回复
热议问题