Dynamic blocks in django templates
It is a question about django that has found absolutely no answer for me. Let's suppose I have a site where I display two blocks in the sidebar :
- A list of the last users who've logged in
- A list of the last published blog articles
Let's say that these blocks are to be displayed on 80% of the website urls and presented using template files. The data for these blocks is generated by code (obviously), bt not by url views.
Well, how t开发者_C百科o do such a thing ?
You might want to take a look at custom template tags.
Edit: more specifically, look at inclusion template tags.
精彩评论