Newly created user have some initial data. -- This feature really I want.
Tried.
I put some sample values into table( FamilyMember
) and dumped into json
format and put that into the name of initial_data.json
in fixtures directory.
Above working fine when i put below lines in command prompt.
python manage.py loaddata --app dashboard initial_data.json
But in my case every registered user will get this data instantly they logged in. How do i gonna achieve this ?
Sample json:
[
{
"fields":{
"first_name":"Father",
"last_name":"Father",
"middle_name":"",
"birth_state":"",
"wife":[
],
"member_image":"",
"familyname":1,
"children":[
9
],
"sex":"M",
"preferred_name":"",
"parents":[
],
"birth_country":"",
"birth_date":"1988-11-10",
"bio_info":"Hi Some Info Here",
"birth_city":"Country"
},
"model":"dashboard.familymember",
"pk":6
},
]