Not getting data from database

19 views
Skip to first unread message

Harshit Sharma

unread,
Jun 8, 2016, 6:42:57 AM6/8/16
to Django REST framework
Hi Everyone,

I am creating a django-rest-api , when i am running api for testing in browser , not geting any

getting output in this form-

HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

[
    {},
    {}
]
i have entered data in database using django admin .
please help me i am new to django restframework
views.py

Mjumbe Poe

unread,
Jun 8, 2016, 11:17:08 AM6/8/16
to Django REST framework
Actually, if you have two Bus_detail objects in your database, then it looks like it's pulling them. What does your Bus_detailSerializer look like? It seems to me that there are no fields in the serializer's definition.

--
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-fram...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Harshit Sharma

unread,
Jun 8, 2016, 2:58:50 PM6/8/16
to Django REST framework
Thank for replying

attaching my serializers file please review it.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framework+unsub...@googlegroups.com.
serializers.py
Reply all
Reply to author
Forward
0 new messages