我在学Django QuerySet
这是我的观点
def CompletedFormulary(request) :
# Fonction qui donne un récapitulatif des informations du formulaire par rapport au dernier formulaire créé.
# Reprise de tous les éléments de la table child et parent ayant l'ID le plus élevé
identity = Identity.objects.all().order_by("-id")[0]
identityAll = list(Identity.objects.all())
context = {
"identity" : identity,
"identityAll" : identityAll,
}
return render(request, 'recapitulatif_identity.html',context)
我的总结_标识.html在
^{pr2}$问题在于标识字段的显示。我想每行打印一行,如果可能的话删除[<Identity: ..... >
我不知道该怎么做。在
这就是结果
做一个循环(见docs)
你只需要迭代一下。在
相关问题 更多 >
编程相关推荐