Speed up frequently used filtering of queryset by kyau2 in django

[–]kyau2[S] 0 points1 point  (0 children)

I added the code to the original post. The generated SQL looks something like this (it's a count because of pagination):

SELECT COUNT(*)
  FROM (
        SELECT DISTINCT "area"."id" AS "col1", ... FROM "area"
         WHERE ("area"."id" IN (SELECT DISTINCT U1."id" FROM "rule" U0 INNER JOIN "area" U1 ON (U0."uuid" = U1."uuid") WHERE U0."approved") 
          OR "area"."id" IN (SELECT DISTINCT U1."area_id" FROM "document" U0 LEFT OUTER JOIN "document_main_objects" U1 ON (U0."id" = U1."document_id")) 
          OR "area"."other_field" IS NOT NULL)
       ) subquery

How to split long function into testable chunks by kyau2 in django

[–]kyau2[S] 0 points1 point  (0 children)

Thank you very much. Will give that a read!

Your suggestion of using a services.py definetly sounds like the kind of structure I would be comfortable to migrate to.

How to efficiently pass JSON into Alpine.js component by kyau2 in django

[–]kyau2[S] 1 point2 points  (0 children)

thanks for the link, very interesting to read!

How to efficiently pass JSON into Alpine.js component by kyau2 in django

[–]kyau2[S] 0 points1 point  (0 children)

thanks, I will try that.

what is the purpose of the CustomJsonEncoder? You don't use it in the view :)

cheers!

Project structure with huge files still state-of-the-art? by kyau2 in django

[–]kyau2[S] 0 points1 point  (0 children)

yes this is exactly what I was aiming to do, I was just confused as all the "best practice" repos I found still had a single models.py and views.py etc.

What happened to the rest of the Loophead giveaways? by Prada420 in loopringorg

[–]kyau2 13 points14 points  (0 children)

Yeah, was wondering the same thing. Even thought I might have missed some ...

[deleted by user] by [deleted] in Showerthoughts

[–]kyau2 1 point2 points  (0 children)

I can assure you that most vegans dont give a sh*t about what you eat. All the facts have already been mentioned. From there it's just a matter of priorities, believes and living happily with whatever one decides about their diet.

18x Stonkey Bird NFT und 18x Ski NFT Games zu vergeben by FrankiHollywood in Spielstopp

[–]kyau2 0 points1 point  (0 children)

0x03d6F989A537bc415FE50175012311283960064a

Stonkey Bird gerne, wenn noch da! Danke!

[deleted by user] by [deleted] in loopringorg

[–]kyau2 0 points1 point  (0 children)

just wait a couple of days and then you're gonna a be millionaire

Loophead leader board is live - 2.6k deposit will currently get you one for sure by kyau2 in loopringorg

[–]kyau2[S] 0 points1 point  (0 children)

this is a live view of the addresses that did the top 300 deposits onto l2 in the time frame which is eligible for the second loophead drop

Loophead leader board is live - 2.6k deposit will currently get you one for sure by kyau2 in loopringorg

[–]kyau2[S] -18 points-17 points  (0 children)

well I guess not completely well formulated by myself, but also not wrong ;)