Lately, I faced a problem while working on a RESTful API using Django and DRF, my mentor was thinking that it was solvable in one line of code, but then we googled the issue only to find that it had been addressed in several questions on Stackoverflow with no accepted answer, and BOOM that is where the adventure started.

What was the problem?

Actually the problem at first glance seems easy, Paginating a set of objects inside another object. Suppose we have an Author, and a Book with a foreign key to the Author, simple and straight forward. Now, we want to send a…

Abdelrahmen Ayman

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store