Skip to content

Instantly share code, notes, and snippets.

View pazooki's full-sized avatar

mrdpzk pazooki

View GitHub Profile
@egasimus
egasimus / Readme.md
Last active January 5, 2021 08:55
A few remarks on the Django REST Framework

A few remarks on the Django REST Framework

For a good while, I've been interested in the topic of automatically generating and routing views. For my last project, I built a haphazard implementation which ran using an elaborate scheme of mixins and decorators. A veritable monstrosity, it was - and the cognitive load of working with it wasted over a month of my time, allowing the project to slowly descend into limbo. I eventually ended up re-writing the heaps of class-based views by hand. Even though making good use of inheritance helped me tremendously, it was still a chore, and my interest in a tool that would save me some boilerplate code for standard CRUD apps remained.

When I first got a glimpse of the Django REST Framework, I was quite impressed by the browsable API; a quick look at the documentation got me hooked onto the concept of ViewSets and Routers. A few days ago, I decided to finally get my feet wet with the DRF and use it in my latest project. I honestly believed that it would b