DISQUS

Eric Florenzano's Blog: Secrets of the Django ORM

  • adsl · 5 months ago
    Thank you for the specific info you providing in the post
  • SeanOC · 1 year ago
    Awesome tip! This will help me get rid of a lot of nasty "extra" statements and custom SQL.
  • Jökull · 1 year ago
    A.w.e.s.o.m.e
  • Martin · 1 year ago
    Great! I get rid of hundred lines of raw-sql just for this aggregation stuff.

    Is it possible to do a count(*) query for grouped lines in this way?
  • Arthur · 1 year ago
    Great tip, I had always thought these features will be added with the aggregation support in 1.1, and didn't know they were already there—Thanks!
  • Benjamin Golub · 1 year ago
    I had *no* clue this was possible. It would have helped a lot in building RSSmeme! Thanks Eric.
  • barbara · 1 year ago
    Oh nice - thanks for that. :)
  • Nicolas Lara · 1 year ago
    Hi,
    You might want to check out the latest patch on ticket #3566 which might make it to trunk soon (I hope =) ). It is important especially because the these tricks will probably break with public API aggregation support.
    Very good hidden tip for the time been though =)
  • massimo · 1 year ago
    Thanks for this post. It was inspirational. ;-)
    http://groups.google.com/group/web2py/t/22cb295...
  • lianyk · 1 year ago
    You might want to check out the latest patch on ticket #3566 which might make it to trunk soon (I hope =) ). It is important especially because the these tricks will probably break with public API aggregation support.
  • wow gold · 1 year ago
    Great! I get rid of hundred lines of raw-sql just for this aggregation stuff.
  • wow gold · 1 year ago
    I'm glad to hear it! Shoot me an e-mail if you have any problems.
  • cheapest wow gold · 1 year ago
    yes!!!
  • wow gold · 1 year ago
    yeah
    !
  • Andreas · 1 year ago
    qs.query.group_by = ['item_type']

    seems to have problems with postgresql.
  • Andreas · 1 year ago
    additional:

    ProgrammingError: ERROR: column id must appear in the GROUP BY clause or be used in an aggregate function
  • Malcolm Tredinnick · 1 year ago
    You've pointed out that this is internal API and it's going to be one of those cases where it really will change. The "having" implementation is very fragile at the moment and has to be changed (it will end up looking more like Query.where). So any code treating it as a list won't work on trunk very shortly.

    I hope people are really, really paying attention when they use internal stuff like this and have lots of tests so that they will notice when the internal code changes.
  • omtv · 1 year ago
    This is something i definitely will use in my code. Thanks!
  • Nick · 1 year ago
    Hmm, after reading a lot of enthusiastic comments I don't think that sharing of tips like that is very useful.

    But anyway thanks for sharing!
    I will not use it in my projects because I have a lot of code already written and tested.I will wait when it will become "regular" magic instead of "black".
  • Paul @ Web design Ireland · 1 year ago
    Neato!

    Bookmarked.to.delicious.
  • slavus · 1 year ago
    This is great.
  • isaac · 1 year ago
    yes, this is a great find and we've been working on finding a solution for aggregate functions.

    Thanks
  • Emily Wall · 1 year ago
    2mmy8bvajdecb7wl
  • Nick · 1 year ago
    Any ideas how to make resulting queryset respect order_by ?
  • inwowgold · 1 year ago
    B.w.e.s.o.m.e
  • john · 1 year ago
    good writen
  • Koxp · 10 months ago
    Do you good
  • vtunnel · 10 months ago
    Great article youtube thank you very much

    Great article vtunnel thank you very much
  • YOUTUBE · 10 months ago
    Great article youtube thank you very much

    Great article vtunnel thank you very much
  • Oyun Download · 9 months ago
    For the aricle has news
  • Online Games · 9 months ago
    Activate there was char
  • Laptop Notebook · 9 months ago
    For was where work
  • Emin Ergin · 9 months ago
    Good has ready the
  • Emin Girgin · 9 months ago
    Mail the problem your blog
  • Barbi Oyunlari · 9 months ago
    For problem network updated
  • wholesale jewelry · 9 months ago
    Good site,thank you!
  • wholesale jewelry · 9 months ago
    seems to have problems with postgre sql
  • forex megadroid · 9 months ago
    top50watches.com- online store for Swiss watches,our Swiss watches are of top quality and most authentic looking designer at cheap / discount price.
  • live · 8 months ago
    Great info, thanks for sharing
  • Free DSi · 8 months ago
    Top article mate! nice one!
  • wholesale jewelry · 8 months ago
    Good site,it is very useful.thks/
  • Baz Taylor · 8 months ago
    Great article. Thanks for the info.
  • tibet tour · 8 months ago
    good,i most like
  • cheap wow gold · 8 months ago
    For this matter, once I discussed with one of my friends, not only about the content you
    talked about, but also to how to improve and develop, but no results. So I am deeply moved by
    what you said today.
  • wholesale jewelry · 7 months ago
    Good info.thks alot.
  • lida diyet zayıflama r10seoogl · 7 months ago
    bitki caylari lida diyet zayıflama r10seoogle zayiflama haplari
    klip izle video izle mp3 dinle
  • lida diyet zayıflama r10seoogl · 7 months ago
    Great info, thanks for sharing
  • good · 7 months ago
    www.cepfox.com
    nice blog
  • 925 silver jewelry · 7 months ago
    Good info.thks alot
  • ben10 oyunları · 7 months ago
    Mail the problem your blog
  • 小遊戲 · 7 months ago
    Mail the problem your blog
  • cheap chanel handbags · 7 months ago
    like it very much ,so good
  • cheap nike shoes · 7 months ago
    also so good
  • wow gold · 7 months ago
    thank you
  • wow gold · 7 months ago
    yes, this is a great find and we've been working on finding a solution for aggregate functions.
  • wholesale jewelry · 7 months ago
    thanks very much
  • china travel agency · 7 months ago
    For this matter, once I discussed with one of my friends, not only about the content you
    talked about, but also to how to improve and develop, but no results. So I am deeply moved by
    what you said today.
  • porno · 7 months ago
    For this matter, once I discussed with one of my friends, not only about the content you
  • ed hardy · 7 months ago
    thanks very much
  • Juergen Brendel · 7 months ago
    Someone asked about COUNT() in conjunction with 'group_by'. I had the same problem and arrived at a solution, which I detailed here: http://www.brendel.com/consulting/blog/2009/06/...
  • club penguin · 7 months ago
    You've pointed out that this is internal API and it's going to be one of those cases where it really will change. The "having" implementation is very fragile at the moment and has to be changed.
  • ekin turkmen · 7 months ago
    sagol
  • laptop batteries · 7 months ago
    The "having" implementation is very fragile at the moment and has to be changed.
  • FPCBP115 · 7 months ago
    Someone asked about COUNT() in conjunction with 'group_by'. I had the same problem and arrived at a solution
  • replica watches · 7 months ago
    I had the same problem and arrived at a solution
  • aaa · 7 months ago
    nice blogger
  • aaaa · 7 months ago
  • sikiş · 7 months ago
  • koxp · 7 months ago
  • koxp · 7 months ago
  • igvir · 7 months ago
  • alex · 7 months ago
    but Django's ORM has a secret weapon: it supports SQL group_by and having clauses, and it has for quite some time.
  • igvir · 7 months ago
  • Sikiş · 7 months ago
    Good a black eric
  • wow gold · 6 months ago
    welldone.
  • Cheap WoW Gold · 6 months ago
    Thank you for the specific info you providing in the post.
  • Flash Game · 6 months ago
    great thank you
  • injection molding · 6 months ago
    nice site for us!
  • louis vuitton · 6 months ago
    when i use the code but wrong....
    help me
  • replica louis vuitton · 6 months ago
    My answer is the same to you.I'm excited for some aggregation functionality to start being exposed as a public API,talked about, but also to how to improve and develop
  • 381373-001 · 6 months ago
    but also to how to improve and develop
  • 312-0292 · 6 months ago
    Thank you for the specific info you providing in the post.
  • PA3154U-1BAS · 6 months ago
    My answer is the same to you.I'm excited for some aggregation functionality to start being exposed as a public API,talked about
  • laptop batteries · 6 months ago
    You won't see this in the Django documentation, you won't see it mentioned on other blogs, and you certainly won't hear the core developers of Django boasting about it, but Django's ORM has a secret weapon: it supports SQL group_by and having clauses, and it has for quite some time.
  • replica watches · 6 months ago
    SQL group_by and having clauses, and it has for quite some time.
  • Metin2 · 6 months ago
    thank you admin
  • Dizi izle · 6 months ago
    very verry much
  • Video izle · 6 months ago
    thank you very much =)
  • NesMedya Haber Video Oyun Seo · 6 months ago
    Thank you for the specific info you providing in the post.
  • Jordan Shoes · 6 months ago
    awewsome! great job!
  • Lida diyet zayıflama r10seoogl · 6 months ago
    SQL group_by and having clauses, and it has for quite some time.
  • cheap louis vuitton · 6 months ago
    thank you ! perfect
  • koxp · 6 months ago
    Thanxxx four articles


    Me ?
    Koxp
    Knight Online
    Karahan Online
  • Silkroad · 6 months ago
    ogrencifan
  • lingerie · 6 months ago
    In regards to composition and django, the one thing I would like to see supported someday, (but I don't have the chops to even attempt to add this to django itself), is the concept of partials
  • lost · 6 months ago
  • sXe · 6 months ago
    THank You ..
  • Van · 6 months ago
    Rather than having to change after the next version of Django it would be nice if its implemented into the update.
  • jordan shoes · 6 months ago
    thank you ! perfect
  • ugg boots · 6 months ago
    awewsome! great job!
  • jordan shoes · 6 months ago
    SQL group_by and having clauses, and it has for quite some time.
  • tiffany jewellery · 6 months ago
    Rather than having to change after the next version of Django it would be nice if its implemented into the update.
  • lida · 6 months ago
    lida resmi satis sitesi nice blog
  • diyet · 6 months ago
    thanks for this great post. You can check out zayıflama and nice blog
  • zayıflama · 6 months ago
    thanks for this post admin.
  • çini · 6 months ago
    great post thank you
  • dj · 6 months ago
    Thank you so much for content, you would track;)
  • Rusli Zainal Sang Visioner · 6 months ago
    i feel lucky can find this usefull informations..
    thanks for this great posting..
  • Stop Dreaming Start Action · 6 months ago
    Thanks for sharing your thought. Wish you good
  • Jumoke · 6 months ago
    Hi, I have been here for several times now and thought to sign your guestbook. Very nice! Keep up the good work.
    I am from Leone and too bad know English, give true I wrote the following sentence: "Definition of flea from the merriam webster online dictionary with audio pronunciations, thesaurus, word of the day, and word games."

    Best regards :), Jumoke.
  • MMO · 6 months ago
    Django ORM is interesting lol.
  • seo services · 6 months ago
    Great tip, I had always thought these features will be added with the aggregation support in 1.1
  • cakes · 6 months ago
    Free Programs, Games, Gsm, Symbian


    http://www.foryouforum.com/
  • Okey Oyna · 6 months ago
    I'd like to congratulate you for this beautiful article was a really nice article nice article your health and your new look
  • Lose Belly Fat · 6 months ago
  • how to lose belly fat · 6 months ago
    One thing you should do in addition is to stay away from fad diets and diets pills. You will want to look into changes that you make to improve your health and your body size. You will also want to get sleep, drink enough

    fluids and eat healthier food in order to lose weight.
  • lose belly fat fast · 6 months ago
    ok
  • Property Addict · 6 months ago
    Awesome tip. Many thanks.
  • flat stomach exercises · 6 months ago
    This is amazing, nice one!
  • korean jewelry · 6 months ago
  • China rubber molding · 6 months ago
    haha, nice site
  • plastic injection molding · 6 months ago
    checked out found a good site!
  • stop dreaming start action · 6 months ago
    very informative
  • Mengembalikan Jati Diri Bangsa · 6 months ago
    Great article. Thanks for the info.
  • stop dreaming start action · 6 months ago
    Great article. Thanks for the info.
  • machine bulle · 6 months ago
    So great !
  • dreamhost · 6 months ago
    Thanks for sharing !
  • Real Estate Software · 5 months ago
    Waiting for the next version of Django you describe it quite well. Thanks
  • Utility Warehouse Distributor · 5 months ago
    Ah, so that's how you do it! This will save some time. Thanks for sharing this :) Still learning the ropes of Django :)
  • sexy lingerie china · 5 months ago
    It is a wonderful article,i like it,thank you very much!
  • copywriting dubai · 5 months ago
    Just read a comment someone said that its not useful sharing such tips. Well if its not useful to you it can be useful to somebody else. So please don't think just for yourself. Post is for everyone who can take benefit.
  • Emo resimleri · 5 months ago
    Oh nice - thanks for that. :)
    http://www.muhtesemforum.net
  • Dunk SB Shoes · 5 months ago
    thank you for your post!
  • sXe · 5 months ago
    Everything is very open and very clear explanation of issues. was truly information. Your website is very useful. Thanks for sharing.
  • tiffany and co · 5 months ago
    It was a very nice idea! Just wanna say thank you for the information you have shared. Just continue writing this kind of post. I will be your loyal reader.Thanks again.
  • Mway · 5 months ago
    Ahhh, this blog post was a life saver!
  • staje · 5 months ago
    good title
  • koxp · 5 months ago
    I'm glad to hear it! Shoot me an e-mail if you have any problems.
  • hikaye · 5 months ago
    Nice post. This post is different from what I read on most blog. And it have so many valuable things to learn. Thank you for your sharing!
  • Asian sex · 5 months ago
    Thanks for interesting news
  • film izle · 5 months ago
    thanks man
  • araba resimleri · 5 months ago
    thanks man
  • film seyret · 5 months ago
    thanks man
  • izlesene · 5 months ago
    thanks man
  • makine mühendisi · 5 months ago
    thanks man
  • sohbet · 5 months ago
    that's a great post, thank you!
  • radyo dinle · 5 months ago
    that's a great post, thank you!
  • cheapbatteries · 5 months ago
    i feel lucky can find this usefull informations...
    thanks.
  • batterychargeradapter · 5 months ago
    thanks.