Created
February 18, 2014 09:38
-
-
Save loic/9067626 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loic84: FunkyBob: so you could customize the QS? like limit the number of related objects pulled from the db, or encapsulate more logic in QS methods. | |
13:49 loic84: say you want Blog.objects.get_queryset() to automatically perform a bunch of select_related/prefetch_related | |
13:50 loic84: when you do Article.objects.select_related('blog'), these are ignored. | |
13:51 loic84: so then you are left with 2 options, either you use prefetch_related('block') rather than select_related so you can use your custom manager, or you duplicate all the logic in the original select_related(). | |
13:52 loic84: also you may want to select_related('blog') but defer() a bunch of fields |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment