1👍
✅
You are using queryset object to fetch class’s attribute. It needs an instance to use class’s attribute. Just change your check method to the following:
def check(request):
dishs = dish.objects.all()
for dish in dishs:
print(dish.dish_name)
params = {'dish': dishs}
return render(request,
"card/check.html", params)
Source:stackexchange.com