Trying to connect Django api to my local sql server databse but it returns the table as empty when testing it in insomnia

I have an sql server database that has mainly 3 tables and I want to create a crud web interface to manage it and I started with creating a Django api for the backend I followed some online guides to do it since I have never done something like this

and after successfully getting the Django server running without errors I sent a GET request with insomnia to fetch a specific table named “memoire” and I got an empty string as a result when that table is filled with some data in my database and I don’t where the problem might be I will attach the database settings in settings.py, the model.py file and views.py and if any further details are needed I will add them.

this is database settings:

DATABASES = {
    'default': {
        'ENGINE': 'sql_server.pyodbc',
        'NAME': 'MyDatabase',
        'USER': 'django',
        'PASSWORD': 'rayen1',
        'HOST': 'localhost',
        # 'PORT':'',

        'OPTIONS': {
            'driver': 'ODBC Driver 17 for SQL Server',
            'Trusted Connection': 'yes',
        },
    }
}

this is models.py

from django.db import models


class NdfItem(models.Model):
    OrgShortName = models.CharField(max_length=255, null=True)
    prod_long_name = models.CharField(max_length=255, null=True)
    prod_short_name = models.CharField(max_length=255, null=True)
    pack_description = models.CharField(max_length=255, null=True)
    Category = models.CharField(max_length=255, null=True)
    Sub_Category = models.CharField(max_length=255, null=True)
    ret_price = models.FloatField(null=True)
    ImageSrc = models.CharField(max_length=255, null=True)
    line_code = models.IntegerField(null=True)
    market_abbr = models.CharField(max_length=255, null=True)
    org_code = models.CharField(max_length=255, null=True)
    pin_elh_status = models.CharField(max_length=255, null=True)
    prod_code = models.CharField(max_length=255, null=True)
    prod_launch_date = models.CharField(max_length=255, null=True)
    prod_out_of_trade_date = models.CharField(max_length=255, null=True)
    weight_unit_pack = models.CharField(max_length=255, null=True)
    pack_weight_measure = models.CharField(max_length=255, null=True)
    pack_size = models.CharField(max_length=255, null=True)
    pack_code = models.CharField(max_length=255, null=True)
    fixed_cont_code = models.CharField(max_length=255, null=True)
    relative_strength_measure = models.CharField(max_length=255, null=True)
    pfc = models.CharField(max_length=255, null=True)
    pack_out_of_trade_date = models.CharField(max_length=255, null=True)
    pin_elh_statuss = models.CharField(max_length=255, null=True)
    market_sector_abbr = models.CharField(max_length=255, null=True)
    nfc = models.CharField(max_length=255, null=True)
    tnfd_long_name = models.CharField(max_length=255, null=True)
    tnfd_short_name = models.CharField(max_length=255, null=True)
    tnfd = models.CharField(max_length=255, null=True)
    hosp_price = models.CharField(max_length=255, null=True)
    atc = models.CharField(max_length=255, null=True)
    


class MemoireItem(models.Model):
    code_grossiste = models.CharField(max_length=255, null=True)
    Code = models.CharField(max_length=255, null=True)
    nom_ventes = models.CharField(max_length=255, null=True)
    nom_de_produit = models.CharField(max_length=255, null=True)
    pfc = models.CharField(max_length=255, null=True)
    


class VentesItem(models.Model):
    code_grossiste = models.CharField(max_length=255, null=True)
    code_produit = models.CharField(max_length=255, null=True)
    lettre = models.CharField(max_length=255, null=True)
    code_postal = models.CharField(max_length=255, null=True)
    unite_vendu = models.CharField(max_length=255, null=True)
    nom_de_produit = models.CharField(max_length=255, null=True)
    prix = models.CharField(max_length=255, null=True)

    

this is views.py

from django.shortcuts import render
from django.http import JsonResponse
from .models import MemoireItem
from django.views.decorators.csrf import csrf_exempt
from rest_framework.views import APIView
from rest_framework.response import Response
from .models import MemoireItem
from .serializers import MemoireItemSerializer

@csrf_exempt
class MemoireList(APIView):
    def get(self, request):
        items = MemoireItem.objects.all()
        serializer = MemoireItemSerializer(items, many=True)
        return Response(serializer.data)
    
    def post(self, request):
        serializer = MemoireItemSerializer(data=request.data)
        if serializer.is_valid():
            serializer.save()
            return Response(serializer.data, status=201)
        return Response(serializer.errors, status=400)


@csrf_exempt
def memoire_detail(request, pk):
    try:
        item = MemoireItem.objects.get(pk=pk)
    except MemoireItem.DoesNotExist:
        return JsonResponse({'error': 'Item does not exist'}, status=404)

    if request.method == 'GET':
        data = {'code_grossiste': item.code_grossiste,
                'code_produit': item.code_produit,
                'nom_ventes': item.nom_ventes,
                'nom_de_produit': item.nom_de_produit,
                'PFC': item.PFC}
        return JsonResponse(data)
    elif request.method == 'PUT':
        # Handle PUT request to update the item
        pass
    elif request.method == 'DELETE':
        # Handle DELETE request to delete the item
        pass

and these ae the column in the memoire table in sql server

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