Get first item of QuerySet in template

后端 未结 4 1199
野性不改
野性不改 2020-12-30 23:01

In my blog app I want to display a list of blog posts and the first image connected to this post. Now I do it this way:

{% for image in entry.image_set.all|s         


        
4条回答
提交回复
热议问题