Django Model Instances Not Displaying in Template

I’m having trouble displaying model instances in my Django template. I have created instances of my Tribute model, and they exist in the database. However, when I render my template, the model instances are not being displayed.

Here’s a breakdown of my code:

Model:

from django.db import models
from django.core.validators import URLValidator

class Tribute(models.Model):
    card_styling = models.CharField(max_length=100, blank=True)
    tribute_title = models.CharField(max_length=100, blank=True)
    tribute_text1 = models.TextField(blank=True)
    tribute_text2 = models.TextField(blank=True)
    
    tribute_stripe_link1 = models.URLField(validators=[URLValidator], blank=True)
    tribute_stripe_link2 = models.URLField(validators=[URLValidator], blank=True)
    tribute_stripe_link3 = models.URLField(validators=[URLValidator], blank=True)
    tribute_stripe_link4 = models.URLField(validators=[URLValidator], blank=True)
    tribute_stripe_link5 = models.URLField(validators=[URLValidator], blank=True)
    tribute_stripe_link6 = models.URLField(validators=[URLValidator], blank=True)
    
    tribute_payment_button_class1 = models.CharField(max_length=100, blank=True)
    tribute_payment_button_class2 = models.CharField(max_length=100, blank=True)
    tribute_payment_button_class3 = models.CharField(max_length=100, blank=True)
    tribute_payment_button_class4 = models.CharField(max_length=100, blank=True)
    tribute_payment_button_class5 = models.CharField(max_length=100, blank=True)
    tribute_payment_button_class6 = models.CharField(max_length=100, blank=True)
    
    price1 = models.CharField(max_length=100, blank=True)
    price2 = models.CharField(max_length=100, blank=True)
    price3 = models.CharField(max_length=100, blank=True)
    price4 = models.CharField(max_length=100, blank=True)
    price5 = models.CharField(max_length=100, blank=True)
    price6 = models.CharField(max_length=100, blank=True)

    def __str__(self):
        return self.tribute_title or 'Unnamed Tribute'

View:

from django.shortcuts import render
from .models import Tribute

def tribute_view(request):
    # Get all Tribute objects
    tributes = Tribute.objects.all()

    # Pass the Tribute objects to the template context
    context = {
        'tributes': tributes
    }
    
    return render(request, 'shop7/shop(with_models).html', context)

Template

{% extends 'shop7/base.html' %}
{% load static %}

{% block body %}
<div class="container card-container-top">
    <div class="row">
        {% for tribute in tributes %}
        <div class="col-md-4">
            <div id="{{ tribute.card_styling }}" class="card">
                <div class="card-body">
                    <div class="card-text-styling">
                        <h5 class="card-title">{{ tribute.tribute_title }}</h5>
                        <p class="card-text"><strong>Helps with:</strong> {{ tribute.tribute_text1 }}<br> </p>
                        <p class="card-text"><strong>Fights against:</strong> {{ tribute.tribute_text2 }}<br></p>
                    </div>
                    <a href="{{ tribute.tribute_stripe_link1 }}" class="btn {{ tribute.tribute_payment_button_class1 }}">{{ tribute.price1 }}</a>
                    <a href="{{ tribute.tribute_stripe_link2 }}" class="btn {{ tribute.tribute_payment_button_class2 }}">{{ tribute.price2 }}</a>
                    <a href="{{ tribute.tribute_stripe_link3 }}" class="btn {{ tribute.tribute_payment_button_class3 }}">{{ tribute.price3 }}</a>
                    <a href="{{ tribute.tribute_stripe_link4 }}" class="btn {{ tribute.tribute_payment_button_class4 }}">{{ tribute.price4 }}</a>
                    <a href="{{ tribute.tribute_stripe_link5 }}" class="btn {{ tribute.tribute_payment_button_class5 }}">{{ tribute.price5 }}</a>
                    <a href="{{ tribute.tribute_stripe_link6 }}" class="btn {{ tribute.tribute_payment_button_class6 }}">{{ tribute.price6 }}</a>
                </div>
            </div>
        </div>
        {% endfor %}
    </div>
</div>

<div class="container card-container-other">
    <div class="row">
        {% for tribute in tributes %}
        <div class="col-md-3">
            <div id="{{ tribute.card_styling }}" class="card">
                <div class="card-body">
                    <div class="card-text-styling">
                        <h5 class="card-title">{{ tribute.tribute_title }}</h5>
                        <p class="card-text"><strong>Helps with:</strong> {{ tribute.tribute_text1 }}<br>
                        <strong>Fights against:</strong> {{ tribute.tribute_text2 }}<br></p>
                    </div>
                    <a href="{{ tribute.tribute_stripe_link1 }}" class="btn {{ tribute.tribute_payment_button_class1 }}">{{ tribute.price1 }}</a>
                    <a href="{{ tribute.tribute_stripe_link2 }}" class="btn {{ tribute.tribute_payment_button_class2 }}">{{ tribute.price2 }}</a>
                    <a href="{{ tribute.tribute_stripe_link3 }}" class="btn {{ tribute.tribute_payment_button_class3 }}">{{ tribute.price3 }}</a>
                    <a href="{{ tribute.tribute_stripe_link4 }}" class="btn {{ tribute.tribute_payment_button_class4 }}">{{ tribute.price4 }}</a>
                    <a href="{{ tribute.tribute_stripe_link5 }}" class="btn {{ tribute.tribute_payment_button_class5 }}">{{ tribute.price5 }}</a>
                    <a href="{{ tribute.tribute_stripe_link6 }}" class="btn {{ tribute.tribute_payment_button_class6 }}">{{ tribute.price6 }}</a>
                </div>
            </div>
        </div>
        {% endfor %}
    </div>
</div>

{% endblock body %}

URL config:

from django.urls import path
from . import views

urlpatterns = [
    path('', views.tribute_view, name="shop"),
    path('shop/', views.tribute_view, name="shop"),
    path('temples/', views.temples_view, name="temples"),
    path('membership/', views.membership_view, name="membership"),
    path('add-product/', views.add_product, name="add_product"),
]

Issue:

Despite having created instances of the Tribute model and confirming their presence in the database, these instances are not appearing on my template page.

Steps I’ve Taken:

Verified that model instances exist in the database.
Ensured the view is correctly querying and passing data to the template.
Checked that the template is correctly using the context data.
Questions:

Are there any obvious mistakes in my view or template code?

Could there be an issue with how the URL is configured or the template file path?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật