How to run external python file and show data in front end of django in the form of table

Hi Guys I want to run my external py scipt and the output will be on json I want to show the data in form of rows and table in front end, the data is dynamic regression testing data. how to I show that using django

Here I tried to give an answer as per I understand your question.

dummy JSON data take (you can take you JSON data which received from file)

    json_response_from_file= [
      "title": "HP Pavilion 15-DK1056WM",
      "price": 1099,
      "brand": "HP Pavilion",
      "category": "laptops",
      "thumbnail": "",
      "images": [
      "title": "Redmi I-10",
      "price": 1100,
      "brand": "Redmi",
      "category": "mobile",
      "thumbnail": "",
      "images": [


import json
def Oneview(request):
    context = {'data':json.loads(json_response_from_file)}
    return render(request,'index.html',context)


    <!doctype html>
    <html lang="en">
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>Bootstrap demo</title>
        <link href="" rel="stylesheet"  >
        <table class="table">
                <th scope="col">No.</th>
                <th scope="col">Thumbnail</th>
                <th scope="col">Name</th>
                <th scope="col">Price</th>
                <th scope="col">Brand</th>
                <th scope="col">Category</th>
                <th scope="col">All-Images</th>
                {% for i in data %}
                    <th >{{forloop.counter}}</th>
                        {% for j in i.images %}
                        {% endfor %}
                {% endfor %}
        <script src=""  ></script>
Back to Top