How to get all the properties of objects using foreign key in django model
问题 Using Djangorestframework I had created rest api. I have two models in my app countries and states. I had related countries model to states model using Foreign key method, But while fetching list of states in States api i am getting states names, but in the place of country i am getting countries primary key id instead of it's name how can i get all the fields of Countries instead of PK id ---------- Models.py code class countries(models.Model): country = models.CharField(max_length=10) def _