SQL Relationship

Django REST Framework with ForeignKey Example

  • Posted on: 10 September 2015
  • By: oon

If you are a noob in Django or Django REST Framework (DRF),
it's pretty hard to find (complete) example about providing REST API for system with (sql relationship) foreign key on its database.

this example on SO is quite straigth forward and complete, about DRF with foreignkey.

http://stackoverflow.com/a/19414405/3991504

ya, you also get django.test.Client information as a bonus. nice!

mostly my problem is about reverse relationship [1][2][3].