3 ms·
DRF is nice enough 90% of the way, but when you need to do something that its authors haven't really thought of, you need to dig in very deep to fix things, I'v
by akx 8y ago
DRF is nice enough 90% of the way, but when you need to do something that its authors haven't really thought of, you need to dig in very deep to fix things, I've found. :/
- Demiurge 8y agoAgreed, for this reason I stopped using it, the investment in those digs were not worth the time to not copy/paste some CRUD api views. Which is what I do now, and modify as needed. If the number of models and views grows too much and gets brittle, maybe it will be worth trying again.
- buttscicles 8y agoI think this is true of django in general.
- sotojuan 8y ago> I think this is true of django in general Probably goes for all opinionated frameworks. That's part of the tradeoff you make when choosing one.
- douglaswlance 8y agoIf that's the case, you should take a step back and think about it from another angle to make absolutely sure that you're not attacking the problem from the wrong vector.
- dwaltrip 8y agoI have heard great things about DRF, and often it is good to resist coloring outside the lines. That being said, your comment assumes that DRF has indeed thought of everything. All abstractions leak, some more than others. Clean escape hatches are very valuable.
- douglaswlance 8y agoI never said that you MUST be thinking about it wrong. I just said to make sure you're not thinking about it wrong. No framework has thought of everything.
- dwaltrip 8y agoAh, my bad, I should have noticed that.
- kennydude 8y agoDRF's code is realtively easy to read and it's designed in a way where you can just roll your own parts quite easily.
- publicfig 8y agoI had that issue for a while, but lately I've really just found that 95 times out of 100, I can accomplish everything I want to do with just a .to_native() and using whatever method I see fit. I know it's not always the most optimal way, but leveraging that allows me to really use DRF for so many projects and get it up easily and without too much hassle.