import json from django.db import migration def parseData(key, value, apps, schema_editor, project): if "City" in key: project(city = value) elif "Country" in key: project(country = value) elif "title" in key: project(title = value) elif "Owner" in key: project(owner = value) elif "Year" in key: project(year = value) elif "teaser" in key: project(teaser_txt = value) elif "heading" in key: project(header = value) elif "description" in key: project(description= value) elif "cid" in key: project(class_cid = value) project(cid = 2) # need 2 parse to int project(cid =value[1:]) elif "category" in key: project(category = value)