from django.core.serializers import serialize
import json


def serialize_bootstraptable(queryset, total):
    json_data = serialize('json', queryset)
    json_final = {"total": total, "rows": []}
    data = json.loads(json_data)
    for item in data:
        del item["model"]
        item["fields"].update({"id": item["pk"]})
        item = item["fields"]
        json_final['rows'].append(item)
    return json_final
29061401f86dcdca6c75cfd0d88e8256326c13c9
<mask token>

<mask token>


def serialize_bootstraptable(queryset, total):
    json_data = serialize('json', queryset)
    json_final = {'total': total, 'rows': []}
    data = json.loads(json_data)
    for item in data:
        del item['model']
        item['fields'].update({'id': item['pk']})
        item = item['fields']
        json_final['rows'].append(item)
    return json_final

from django.core.serializers import serialize
import json


def serialize_bootstraptable(queryset, total):
    json_data = serialize('json', queryset)
    json_final = {'total': total, 'rows': []}
    data = json.loads(json_data)
    for item in data:
        del item['model']
        item['fields'].update({'id': item['pk']})
        item = item['fields']
        json_final['rows'].append(item)
    return json_final

from django.core.serializers import serialize
import json


def serialize_bootstraptable(queryset, total):
    json_data = serialize('json', queryset)
    json_final = {"total": total, "rows": []}
    data = json.loads(json_data)
    for item in data:
        del item["model"]
        item["fields"].update({"id": item["pk"]})
        item = item["fields"]
        json_final['rows'].append(item)
    return json_final