You are doing a get to the default route for the viewset I am guessing?
That would return a list - because you are getting ALL records and not one
specific record.
If you added more records to the database you will also see more in the
list.
See here for more information:
https://www.django-rest-
In my django application with database engine djongo, I'm trying to return
a JSON response by retrieving from my database. But, I'm receiving JSON
array instead of JSON object. Currently, there is only one record in my
database. Please see the code below.
model.py
class bloodDonors(models.Mode
In my django application with database engine djongo, I'm trying to return
a JSON response by retrieving from my database. But, I'm receiving JSON
array instead of JSON object. Currently, there is only one record in my
database. Please see the code below.
model.py
class bloodDonors(models.Mode
3 matches
Mail list logo