Hi René, On Tue, 21 Jul 2020 18:46:12 +0200 René Fleschenberg <[email protected]> wrote:
> https://github.com/kako-nawao/django-group-by > It doesn't actually aggregate, so the name "group-by" seems unwarranted. What it does, as the README explains, is replace "values" by something which does two things: - Sets the seclected fields as attributes on the object returned, rather than as dict values - Where the selected field is a FK, follows the relationship to get the object > Is there a deeper reason why this functionality is not available in > Django core? If I'm not mistaken, only() provides this functionality, with the difference that if you then try to access an unselected attribute on the object, with only() it is fetched, while with this "group_by()" you get an AttributeError. (django-group-by has other limitations -- e.g. it is designed to handle "rel__field" but not "rel1__rel2__field") Did I miss anything important? -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/20200721215215.5c325bd8.shai%40platonix.com.
