Using the slice filter with context data from a Django QuerySet

前端 未结 1 749
抹茶落季
抹茶落季 2021-01-29 07:25

I am trying to split a list from my model across two columns, using this html code in the template:

< div class =\"col-md-6\" >
{%for value in object_list          


        
1条回答
  •  感动是毒
    2021-01-29 07:54

    I think, what you need is this:

    
      {% for value in object_list %}
      
     {% endfor %}
    
    URL SITE
    {{value.url}} {{value.Site}}

    URLs and Sites will be displayed as a table.

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