title: How to correctly create a response for the selected values for Ext.data.TreeStore on django
body: <p>I have several objects in the database that I want to display in <code>Ext.tree.Panel</code> -</p>
  
  <pre><code>[
  {"model": "hello_extjs.storage", "pk": 1, "fields": {"code": "111", "name": "Test Main", "id_parent": 1}},
  {"model": "hello_extjs.storage", "pk": 2, "fields": {"code": "222", "name": "Test1 ", "id_parent": 1}}, 
  {"model": "hello_extjs.storage", "pk": 3, "fields": {"code": "333", "name": "Test2 ", "id_parent": 1}}, 
  {"model": "hello_extjs.storage", "pk": 4, "fields": {"code": "444", "name": "Main Test2 ", "id_parent": 1}}, 
  {"model": "hello_extjs.storage", "pk": 5, "fields": {"code": "555", "name": "Test3", "id_parent": 4}}, 
  {"model": "hello_extjs.storage", "pk": 6, "fields": {"code": "666", "name": "Test4", "id_parent": 4}}
  ]
  </code></pre>
  
  <p>The model itself looks like this:</p>
  
  <pre><code>class Storage(models.Model):
      code     =   models.CharField(max_length = 255, null=True)
      name      =   models.CharField(max_length = 255, null=True)
      id_parent  = models.ForeignKey('self', on_delete=models.CASCADE)
  </code></pre>
  
  <p>How to correctly serialize data for an answer in <code>Ext.data.TreeStore</code>?</p>
  
  <pre><code>from django.core import serializers
  ...
      if model == 'Storage':
                  if method == 'Read':
                      try:
                          # Read the data                        
                          storage = list(Storage.objects.values('id', 'name', 'id_parent'))
                          result = {'data': storage, 'meta': {'success': True, 'msg': ''}}
                          tree_data = serializers.serialize("json", Storage.objects.all())#How to correctly create an array of data for an answer in Ext.data.TreeStore?
                          print('Look: ' + str(tree_data))                                            
                          return HttpResponse(tree_data)
                          ....
  </code></pre>