JSON data convert to the django model
<p>I need to convert JSON data to django model.</p>

<p>This is my JSON data</p>

<pre><code>{
  "data": [
    {
      "id": "20ad5d9c-b32e-4599-8866-a3aaa5ac77de",
      "name": "name_1"
    },
    {
      "id": "7b6d76cc-86cd-40f8-be90-af6ced7fec44",
      "name": "name_2"
    },
    {
      "id": "b8843b1a-9eb0-499f-ba64-25e436f04c4b",
      "name": "name_3"
    }
  ]
}
</code></pre>

<p>This is my django method</p>

<pre><code>def get_titles():
    url = 'http://localhost:8080/titles/' 
    r = requests.get(url)
    titles = r.json()
    print(titles['data'])
</code></pre>

<p>What I need is convert to the model and pass to the template. Please let me know how to convert JSON to Model.</p>