Okeyy you are welcomeSent from Samsung tablet.
Original message From: Kushal Neupane
Date: 30/04/2020 16:43 (GMT+03:00) To: django-users@googlegroups.com Subject:
Re: How to count total number of student to display in template Thank you
sir.😊On Thu, Apr 30, 2020, 19:28
Thank you sir.😊
On Thu, Apr 30, 2020, 19:28 lumwakapuku wrote:
> In you are view create a function
> Eg
> def student():
>student = Student.objects.all()
>Tt_student = student.count()
> Context = { "student":student, "Tt_student":Tt_student }
> Return render(reque
In you are view create a function Eg def student(): student =
Student.objects.all() Tt_student = student.count() Context = {
"student":student, "Tt_student":Tt_student } Return render(request,
"your templete here", context)In you templete render it as {{ Tt_student
}}
3 matches
Mail list logo