I found the way to do it. First we create a JSON file using below line. Note - role is app name.
python3 manage.py dumpdata --format=json role > initial_role_data.json
After running the above commands it will create a file named initial_role_data.json which will have data some like this -
[
{
"model":"role.role",
"pk":1,
"fields":{
"name":"Super Admin",
"description":"This is Super Admin"
}
},
{
"model":"role.role",
"pk":2,
"fields":{
"name":"Admin",
"description":"This is Admin"
}
},
]
Note i have data already inside my database table. You can create json file similar to above manually also.
Once the json file is generated we will load the data.
python3 manage.py loaddata initial_role_data.json