Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

django-batch-select (via) A smart attempt at solving select_related for many-to-many relationships in Django. Add a custom manager to your model and call e.g. Entry.objects.all()[:10].batch_select(“tags”) to execute two queries—one pulling back the first ten entries and another using an “IN” query against the tags table to pull back all of the tags for those entries in one go.

Tagged , , , , , , ,

11 comments

  1. Why we don't have this feature builtin in Django's Core?

    Vinicius Mendes - 23rd November 2009 20:24 - #

  2. I did something very similar a while back with django-selectreverse.

    koenb - 23rd November 2009 20:45 - #

  3. I think django-selectreverse is great too.

    sydney - 24th November 2009 02:11 - #

  4. Woah nelly, how about them aplpes!

    Melloney - 16th August 2011 04:04 - #

  5. This was a really special and interesting article in my opinion. I really do appreciate all of this great and fun information. Backlink List

    Bailey Walsh - 11th October 2011 03:21 - #

  6. Thank you for the posts. I found the information to be informative and useful.
    <a href="http://www.theroofdoctors.net/roof_repairs_s tockton.php">roof repairs stockton</a>

    cy - 11th October 2011 20:17 - #

  7. I will recommend my friends to read this. Bottes UGGI am quite sure they will UGG Pas Cher learn lots of new stuff here than anybody else!

    ugg pas cher - 28th October 2011 03:26 - #

  8. Very impressive site..Having hard time at first when i put my comments on it.its worth it!nice one! rocky mountain collection

    sheason - 1st November 2011 01:59 - #

  9. I found your blog site on google and examine a few of your early posts. Proceed to maintain up the excellent operate. ecommerce web design

    ecommerce web design - 3rd November 2011 09:20 - #

  10. Thank you for the info.. i've been searching django-batch-select for so long finally I found it here. Host travel agency

    Host travel agency - 3rd November 2011 10:02 - #

  11. Very good information, thanks so much for sharing uggs outlet

    Jody - 5th November 2011 22:08 - #

Comments are closed.
A django site