my user model has a field of posts made by them id like it to look like this
{
"url": "http://localhost:8000/users/2/",
"id": 2,
"username": "admin",
"email": "example@example.com",
"account_created": "3 days, 17 hours ago",
"posts": [
{
"id": 3,
"title": "",
"image": "www.aws.com/object/55f68625-a20d-4502-b6a0-5c0d850a1145.png",
"created_on": "2024-11-30T23:58:53.912556Z",
"user_id": 2
}
]
}
but the result is
{
"url": "http://localhost:8000/users/2/",
"id": 2,
"username": "admin",
"email": "example@example.com",
"account_created": "3 days, 17 hours ago",
"posts": [
{
"id": 3,
"title": "",
"image": "55f68625-a20d-4502-b6a0-5c0d850a1145.png",
"created_on": "2024-11-30T23:58:53.912556Z",
"user_id": 2
}
]
}
no idea where to start with this does anyone have a good starting point ?