0

Here is the result of my serializer model

"saved_homes": [
            {
                "id": 23,
                "saved_home": {
                    "home_id": 1,
                    "home_price": 120000,
                    "home_type": "Flat",
                    "virtual_tour_url": "https://www.youtube.com/watch?v=LnsIJcx6fqY",
                    "hoa_dues": 1000,
                    "address": "112 Salleydeen Street, Tema Community 25",
                    "number_bedrooms": 4,
                    "number_bathrooms": 3,
                    "lot_size": 2400,
                    "year_built": 2010,
                    "describe_home": "A home full of the latest technology",
                    "related_website": "https://www.youtube.com/watch?v=tkuqpsyktvA",
                    "love_about_home": "The amount latest technology built in this house"
                }
            }
        ]

so I am wondering, is they a way in django rest framework that I can make a reference to another api endpoint using saved_home id(home_id); So I want saved_homes to be something like this;

"saved_homes": [
            {
                "id": 23,
                "saved_home": {
                    "http://localhost:8000/api/homes/1/"
                }
            }
        ],
user10031694
  • 211
  • 3
  • 14

0 Answers0