import json
with open('data.json') as data_file:
data = json.load(data_file)
class DataBox(models.Model):
title = models.CharField(max_length=255)
def fillData(self, data):
for items in data:
self.title = data[items]['title']
super(Databox, self).save()
aW1wb3J0IGpzb24Kd2l0aCBvcGVuKCdkYXRhLmpzb24nKSBhcyBkYXRhX2ZpbGU6ICAgIAogICAgZGF0YSA9IGpzb24ubG9hZChkYXRhX2ZpbGUpCgpjbGFzcyBEYXRhQm94KG1vZGVscy5Nb2RlbCk6Cgl0aXRsZSA9IG1vZGVscy5DaGFyRmllbGQobWF4X2xlbmd0aD0yNTUpCgkKCWRlZiBmaWxsRGF0YShzZWxmLCBkYXRhKToKCQlmb3IgaXRlbXMgaW4gZGF0YToKCQkJc2VsZi50aXRsZSA9IGRhdGFbaXRlbXNdWyd0aXRsZSddCgkJc3VwZXIoRGF0YWJveCwgc2VsZikuc2F2ZSgp