> Le 6 sept. 2017 à 10:00, Melvyn Sopacua <
m.r.s...@gmail.com> a écrit :
>
> One of the core design issues with DRF is that everything
> is based around a queryset. Even if the set is just one item.
This sounds like an easy troll.
A lot of code from DRF is based around queryset because DRF can introspect and deduce a lot from them.
How is DRF supposed to perform filtering on something that we don’t know (aka not based on a Model) ?
Same question for automatic field generation, constraints, pagination and so on.
One thing people need to realize is that:
1. It’s simple to use DRF with non model data, including viewsets - as opposed as what I’ve read on this thread.
2. developer has to write way more code because the framework can *not* guess anything from it
3. A lot of code and documentation covers things based on models because models embedded data description in a structured way while we can’t say much about non model things.
Regards,
Xavier.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/CA%2Bgw1GUuk3kLZ90w5HX9jxVQQJD%3DnEMRh%3DoozcP-BcQPH74P0w%40mail.gmail.com.