31168-1

Name Medieval Horse Knight Castle
Released 2025
(Aug. 1, 2025 to Dec. 31, 2028)
Inventory 1371 parts
Theme Creator > Creator 3-in-1

See our review:

Buy this LEGO Set

Purchasing from the above links may result in a commission being paid to Rebrickable, but at no extra cost to you.
Disney Castle

External Sites

This Set is known differently at other sites:

BrickLink 31168-1
BrickOwl 971529
Brickset 31168-1
151,500
May 1, 2025, 6:05 a.m. by TobyMac
Jan. 19, 2026, 9:40 a.m. by Rebrickable
to your account to add or reply to comments.
  • Avatar image for Rebrickable user F-Guybuildslego
    3 weeks, 6 days ago F-Guybuildslego Level 3
    This a Really Good Castle. Its Cheaper than the other castles. Defo Gotta Buy.
  • Avatar image for Rebrickable user ShaunGamer
    1 month, 2 weeks ago ShaunGamer Level 4
    There are some really good alternative builds for this, especially if you have multiple sets.
    So I was really happy to get 3 of these on a massive Black Friday discount of nearly half price.
    Looking forward to spending most of the Christmas break building a lot of these MOCs.
    • Avatar image for Rebrickable user abek_k
      1 month, 2 weeks ago abek_k Level 4
      haha same! just finished my first one
    • Avatar image for Rebrickable user Stocci
      3 weeks ago Stocci Level 6
      Same here, I'm sad I took only two, wish I had three to mix with my Medieval town square! 
      Trying to integrate also Majisto's Workshop.
    • Avatar image for Rebrickable user ShaunGamer
      2 weeks, 4 days ago ShaunGamer Level 4
      Having spent a week building all three of the different models and customizing them with left over bricks, I can say there is a ton of play-ability even in only one set. I am really enjoying letting my imagination run free.
      There is definitely opportunity to add more variety to the pieces, so I will probably purchase some other sets that compliment them.
      But one set is more than enough to keep you occupied for a while.
  • Avatar image for Rebrickable user 1778760
    2 months ago 1778760 (deleted) Level 11
    <deleted>
    • Avatar image for Rebrickable user Bobbyme
      1 month, 2 weeks ago Bobbyme Level 7
      The price hike is unfortunate. But 31120 would have been 130 if it didn't retire. Both pirate ship and viking ship did not retire, and both got their price increased to 130. So sadly, if it were still sold today, 31120 would also be 130. It's just a set from a better time in that regard. Interestingly though 31168 seems to live on a discount. I've gotten two for the price of one, and I've seen it discounted since day one. All this is based on european prices, this may be very different elsewhere of course.
  • Avatar image for Rebrickable user Bavarianwolf
    3 months ago Bavarianwolf Level 11
    Way worse then 31120.. buy the old one
    • Avatar image for Rebrickable user DnDBrickinBros
      3 months ago DnDBrickinBros Level 17 MOC Designer
      yessssssssssir
    • Avatar image for Rebrickable user graeymaelkyn
      1 month, 2 weeks ago graeymaelkyn Level 17 MOC Designer
      Absolutely. It's more expensive (even when considering inflation). The playability is worse: You cannot put a single minifigure on top of the gatehouse, for example. And the parts are - in my opinion - less suitable for MOCs compared to the set 31120 which just had way more potential. And it's bugging me that LEGO changed the connections of the castle parts compared to the set 31120 so you cannot just combine it without changing something.
  • Avatar image for Rebrickable user SD-V_Guh
    3 months ago SD-V_Guh Level 12 MOC Designer
    there are currently 89 comments of people complaining abt either the price or build of this set and when its shown this set is made for 9 year olds who dont care if a build isnt detailed enough
    • Avatar image for Rebrickable user LegoHarypotterencityfan
      2 months, 2 weeks ago LegoHarypotterencityfan Level 5
      its not even a bad build i enjoyed building it
      • Avatar image for Rebrickable user C0leman
        2 months, 2 weeks ago C0leman Level 7
        It is cool but as an older fan of Lego, for the pieces, it is not worth the price. Therefore, if you can find set 31120 it would be more ideal in my opinion. I have also built both sets and I will say that the build quality is better, especially for the price, in the older set than the more expensive newer set.
    • Avatar image for Rebrickable user sam253546
      2 weeks, 4 days ago sam253546 Level 7 MOC Designer
      good point
  • Avatar image for Rebrickable user X-SHOT PRO MAX
    3 months, 2 weeks ago X-SHOT PRO MAX Level 6
    this thing also costs 30$ more on amazon.
    I'm NOT getting this.
    (my brother still wants it)
    • Avatar image for Rebrickable user thebrickshipyard
      3 months ago thebrickshipyard Level 13 MOC Designer DESIGNER
      just have some patience and wait until after the holiday season. See if you can convince your brother as well. The price will drop a little bit early 2026. Not a lot, maybe $10-20 at most, but enough to be a better value. Castle fans are starved for sets so this thing is gonna be popular for a while.
  • Avatar image for Rebrickable user X-SHOT PRO MAX
    3 months, 2 weeks ago X-SHOT PRO MAX Level 6
    why don't they release a castle that is bigger than the medieval castle?
    that thing has like, a hundred more parts!
  • Avatar image for Rebrickable user cemalkzlky
    4 months, 2 weeks ago cemalkzlky Level 6
    minifigs are awesome but i can not say same for the buildings
  • Avatar image for Rebrickable user Nightlord_Builds
    4 months, 2 weeks ago Nightlord_Builds Level 19 MOC Designer DESIGNER
    I am having an extremely hard time making decent MOCs out of this without a second castle or extra parts

    This should not be 30 dollars more than the previous castle.
    • Avatar image for Rebrickable user sebbl
      4 months, 1 week ago sebbl Level 19 MOC Designer DESIGNER
      Getting started with this set was quite a challenge for me too. While it has some outstanding pieces, the limited quantities made it tricky. I found that it works well for building smaller structures, just like the official instructions suggest, but attempting to create a single large structure felt overwhelming.
      • Avatar image for Rebrickable user Nightlord_Builds
        4 months, 1 week ago Nightlord_Builds Level 19 MOC Designer DESIGNER
        I had better time trying to make a house.
      • Avatar image for Rebrickable user Bubich
        4 months ago Bubich Level 8
        Could combining a single 31168 with one 31120 be a good idea for a single large structure?
        • Avatar image for Rebrickable user sebbl
          3 months, 2 weeks ago sebbl Level 19 MOC Designer DESIGNER
          Yes, certainly. It's just a lot of effort to really make good use of most of the 3000 parts of both sets combined.
          • Avatar image for Rebrickable user andrescas171
            2 months, 4 weeks ago andrescas171 Level 13
            If I had to guess, the best way to utilize both sets would be to use the larger pieces of 31168, such as the ones used for the towers, to create larger buildings, while the more versatile pieces of both 31120 and the smaller pieces of 31168 create the general base and smaller structures.

            For example, an outpost made of both sets could have the larger watch tower consist mostly of 31168 parts, while the general ground and smaller buildings such as offices or cabins could be made with 31120, the far more versatile set.

            Thats just how I view it honestly, I love both sets equally, and 31168 was very fun to build and even more fun to modify, because of its very simple parts.
  • Avatar image for Rebrickable user Dennispltz
    4 months, 3 weeks ago Dennispltz Level 6
    A bit underwhelming. After having bought the Castle in the Forrest, Seaside Market, Medieval Village, this feel much more like a toy. Hardly any exciting building techniques, small towers that are our of scale, it closes up but has an open back still. It is not a bad set, but clearly more of a toy. That's fine. I wanted to get one because of the new knight figures because I thought I can mix them with the three Dragonborn Palladins i have converted into knights. The more faded white of the Palladin looks better in my opinion. I got the set for 25% off, I will most likely get another one when it is discounted even more. It's more of a parts pack for me. See, I have a hard time taking the beforementionend sets apart. This one will not stay assembled for long I guess.
    • Avatar image for Rebrickable user andrescas171
      2 months, 4 weeks ago andrescas171 Level 13
      The 3 sets you mentioned (Castle in the Forest, Seaside Market, Medieval Village), are all 18+ sets, so I also wouldn't be surprised on how much simpler this set is compared to those three masterpieces.

      I totally recommend getting another one of this set, maybe even 2 or 3 more, considering some of the great alternate builds that have been made. By itself, the parts aren't all that great for alternate builds, but with the parts doubled or tripled, you can clearlymake some great pieces of works, as shown by The_Astral_J's Horse Knight Citadel, and BrickDuvels Done Horseleone, an alt build with even more pieces than the Lion Knights Castle.
      • Avatar image for Rebrickable user Dennispltz
        2 months, 2 weeks ago Dennispltz Level 6
        You are right, these sets were made for different demographics. As I said, it's fine. I rebuilt this set into a book nook after purchasing instructions here, that was a lot of fun.
        • Avatar image for Rebrickable user sam253546
          2 weeks, 4 days ago sam253546 Level 7 MOC Designer
          Was that wurger bricks? I’ve seen his too. Nice build, but only if you have a bookshelf
  • Avatar image for Rebrickable user punchike
    4 months, 3 weeks ago punchike Level 6
    I have the impression that this lego set resembles the 1986 classic castle 6074.
    • Avatar image for Rebrickable user dandelbaum
      3 months, 1 week ago dandelbaum Level 12 MOC Designer
      Inspiration from 6074 does indeed seem to be there with the steep roof on the tower and the tudor wall.
  • Avatar image for Rebrickable user AlteredBrick
    5 months ago AlteredBrick Level 13 MOC Designer
    Price is a bit too high but other then that it looks cool, will definitely get it in an adequate price.
    • Avatar image for Rebrickable user dandelbaum
      3 months, 1 week ago dandelbaum Level 12 MOC Designer
      Luckily it is already heavily discounted. I bought it for 79,80 euro instead of 120.
      • Avatar image for Rebrickable user AlteredBrick
        3 months, 1 week ago AlteredBrick Level 13 MOC Designer
        Yeah well for most new sets catalog price is like 120-130% of whats it worth so I see it as heavily discounted only when it is like 60% of catalog price.
  • Avatar image for Rebrickable user NeilyAre
    5 months, 1 week ago NeilyAre Level 11
    Still cannot believe they did a castle set without any masonry bricks and with towers so small you cannot get a fig in them. I am so disappointed with this set, in comparison to the previous castle this is some really half finished amateurish build. It looks like they just ran out of bricks and decided it was good enough, another set from Lego that misses the mark by a wide margin.
    • Avatar image for Rebrickable user thebrickshipyard
      4 months, 3 weeks ago thebrickshipyard Level 13 MOC Designer DESIGNER
      I hate to be critical also about the set also, but generally I agree with your points. Some weirdly unfinished areas throughout the castle. A total boon for Rebrickable castle people though who are buying 2 official sets to make a complete castle.
      • Avatar image for Rebrickable user NeilyAre
        4 months, 3 weeks ago NeilyAre Level 11
        I used to hate to be critical, back when Lego could barely put a foot wrong, unfortunately it is no longer 2010. Now we are living in the nightmare called 2025, and we are struggling with a Lego that can barely do anything right, sets are either underwhelming or crazy expensive or both! Take the Twilight House set for example, the original design was masterful, a stunning display piece. Then Lego got hold of it and spent two whole years working hard to make the sad anaemic looking travesty of a set we got, if you spend two years working on a project and after two years hard work all you manage to do is make it a thousand times worse then we have a problem. If a set would have been better if Lego had sent its designer team to go party in Barbados for two years instead of doing their jobs, then I have a problem. 
        I now enjoy being critical, I have had enough of overpriced mediocre sets.
        • Avatar image for Rebrickable user thebrickshipyard
          4 months, 3 weeks ago thebrickshipyard Level 13 MOC Designer DESIGNER
          I don't know much about the Twilight set, although I saw it briefly. It just looked like a basic Creator house and the Friend's houses have superior designs without the IP tax.  These one off sets are extremely hit or miss. Either the designers were passionate fans of the source material and given a generous parts budget to work with, or the stars do not align. Either way, yep, Lego will charge prices as if they made a top tier product which is doubly insulting. 

          I think overall this lastest castle entry will be a success because the price isn't ridiculous and will discount soon closer to the sweet $100 price point. The new factions and figures are aces. Lego put a ton of effort into them. I just wish they would go the extra mile with another Snake Faction set ($25 battlepack thing). Even as a GWP, which I normally detest the practice, would have encouraged day 1/week 1 sales. 

          As for the castle techniques, both pro and cons to the use of big pieces, minus the special masonry bricks. Maybe the designers went too basic in the towers and I agree any spaces should at least allow access by a minfigure. Maximize the playability always. I don't appreciate the trend by Lego in 2025 to just make facade faces on buildings and absolutely skimp on the rear sections like the customers would never turn them around and want to create a scene. Those are features always covered in the older days like 2010s and before, so to see Lego skip them in modern times does illicit a negative reaction especially at full price.
    • Avatar image for Rebrickable user 1731406
      4 months, 3 weeks ago 1731406 (deleted) Level 10
      <deleted>
  • Avatar image for Rebrickable user MIJbricks
    5 months, 2 weeks ago MIJbricks Level 15 MOC Designer
    I love this castle, and the minifigs are awesome! However, it does not beat 31120 for me.
    • Avatar image for Rebrickable user NeilyAre
      4 months, 3 weeks ago NeilyAre Level 11
      This set will be a far tougher set to Moc than our Lord and saviour 31120 that brought me back from a dark age. I bought just one of the new one to catalogue the parts and it could only be described as, "disappointing", it is very short on plates compared to 31120. The lack of masonry bricks is just bizarre, plus it is very short on tiles and shockingly lacking in coloured pieces making things very difficult as far as contrast goes. The set feels like it is missing so much compared to 31120, the figs are better...but everything else is worse, a lot worse.
      • Avatar image for Rebrickable user andrescas171
        4 months, 2 weeks ago andrescas171 Level 13
        This is funnily enough my first lego castle I've built, and I'm planning to get 31120 pretty soon, because I want to see what the hypes about.
        I honestly can see where you come from, I saw many reviews talking about the lack of masonry bricks and how simple it looks. Me personally, I had a blast building it, and I think it looks really good, especially next to 31161.
        Truth be told, I was given the option between this one and 31120, and I picked this one. I just felt it had more to offer in terms of minifigs and it's design, for me, it feels like a castle, while 31120 feels more like a camp or a base, especially with it only having 3 minifigures, and its linear design (if that makes sense). I would like to be proven wrong once I get 31120 however!
Load More Comments

Alternate Builds (MOCs)

These MOCs can be built using only the parts in 31168-1 Medieval Horse Knight Castle.

Helm's Deep
Alt

B-Models

These are official B-Models of 31168-1 Medieval Horse Knight Castle.

Medieval Windmill and Bakery
31168-1-b1
(817 parts)
Creator > Creator 3-in-1 2025
Medieval Tournament
31168-1-b2
(866 parts)
Creator > Creator 3-in-1 2025
Already have some of the parts? Use the Build this Set page to only show the parts you are missing.
Create an account to change the default filters used.

Waiting for Inventory to load

Create an account to change the default filters used.
DJDT

Time

Resource usage

Resource Value
User CPU time 2288.913 msec
System CPU time 37.648 msec
Total CPU time 2326.561 msec
Elapsed time 2720.907 msec
Context switches 1037 voluntary, 452 involuntary

Browser timing

Timing attribute Timeline Milliseconds since navigation start (+length)

SQL queries from 1 connection

  • default 398.43 ms (443 queries including 409 similar and 187 duplicates )
Query Timeline Time (ms) Action
SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector"
  FROM
"lego_baseset"
 WHERE
"lego_baseset"."set_num" = '31168-1'
 LIMIT
21
SELECT ••• FROM "lego_baseset" WHERE "lego_baseset"."set_num" = '31168-1' LIMIT 21
2 similar queries. Duplicated 2 times.
0.54

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(112)
  baseset = get_or_none(BaseSet.all_objects, set_num=set_num)

/home/nathan/rb/site/./rb/utils.py in get_or_none(605)
  return manager.get(**kwargs)

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector"
  FROM
"lego_baseset"
 WHERE
"lego_baseset"."set_num" = '31168-1'
 LIMIT
21
SELECT ••• FROM "lego_baseset" WHERE "lego_baseset"."set_num" = '31168-1' LIMIT 21
2 similar queries. Duplicated 2 times.
0.18

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(337)
  baseset = BaseSet.all_objects.get(set_num=set_num)

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "lego_set"."baseset_ptr_id",
       "lego_set"."start_date",
       "lego_set"."end_date"
  FROM
"lego_set"
 INNER JOIN
"lego_baseset"
    ON
("lego_set"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
"lego_set"."baseset_ptr_id" = 270817
 LIMIT
21
SELECT ••• FROM "lego_set" INNER JOIN "lego_baseset" ON ("lego_set"."baseset_ptr_id" = "lego_baseset"."id") WHERE "lego_set"."baseset_ptr_id" = 270817 LIMIT 21
4 similar queries. Duplicated 2 times.
0.33

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(344)
  set = baseset.get_child_instance()

/home/nathan/rb/site/./lego/models/sets.py in get_child_instance(1666)
  return self.set

SELECT "lego_inventory"."id",
       "lego_inventory"."set_id",
       "lego_inventory"."version",
       "lego_inventory"."name",
       "lego_inventory"."is_active",
       "lego_inventory"."num_parts",
       "lego_inventory"."num_versions"
  FROM
"lego_inventory"
 WHERE
"lego_inventory"."id" = 274911
 LIMIT
21
SELECT ••• FROM "lego_inventory" WHERE "lego_inventory"."id" = 274911 LIMIT 21
3 similar queries.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(369)
  inventory = set.get_default_inventory()

/home/nathan/rb/site/./lego/models/sets.py in get_default_inventory(971)
  if self.default_inventory is not None:

SELECT "lego_changelog"."id",
       "lego_changelog"."timestamp",
       "lego_changelog"."user_id",
       "lego_changelog"."model",
       "lego_changelog"."instance_id",
       "lego_changelog"."set_num",
       "lego_changelog"."part_num",
       "lego_changelog"."old_value",
       "lego_changelog"."new_value"
  FROM
"lego_changelog"
 WHERE
"lego_changelog"."set_num" = '31168-1'
 ORDER BY
"lego_changelog"."timestamp" DESC
SELECT ••• FROM "lego_changelog" WHERE "lego_changelog"."set_num" = '31168-1' ORDER BY "lego_changelog"."timestamp" DESC
11.42

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(381)
  changes = set.get_change_summary()

/home/nathan/rb/site/./lego/models/sets.py in get_change_summary(1121)
  changes = ChangeLog.get_changes(set_num=self.set_num)

/home/nathan/rb/site/./lego/models/changes.py in get_changes(276)
  if len(changes) > 0:

SELECT "lego_setstatstotal"."set_id",
       "lego_setstatstotal"."hits",
       "lego_setstatstotal"."builds",
       "lego_setstatstotal"."likes",
       "lego_setstatstotal"."bi_downloads",
       "lego_setstatstotal"."featured_hits",
       "lego_setstatstotal"."user_hits"
  FROM
"lego_setstatstotal"
 WHERE
"lego_setstatstotal"."set_id" = 270817
 LIMIT
21
SELECT ••• FROM "lego_setstatstotal" WHERE "lego_setstatstotal"."set_id" = 270817 LIMIT 21
0.17

Connection: default

Transaction status: In transaction

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(384)
  set.stats.inc_hits()

/usr/lib/python3.10/contextlib.py in inner(79)
  return func(*args, **kwds)

/home/nathan/venv_rb310/lib/python3.10/site-packages/annoying/fields.py in __get__(36)
  .__get__(instance, instance_type)

UPDATE "lego_setstatstotal"
   SET
"hits" = 151586,
       "builds" = 285,
       "likes" = 0,
       "bi_downloads" = 0,
       "featured_hits" = 0,
       "user_hits" = 0
 WHERE
"lego_setstatstotal"."set_id" = 270817
UPDATE "lego_setstatstotal" SET "hits" = 151586, "builds" = 285, "likes" = 0, "bi_downloads" = 0, "featured_hits" = 0, "user_hits" = 0 WHERE "lego_setstatstotal"."set_id" = 270817
0.18

Connection: default

Transaction status: In transaction

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(384)
  set.stats.inc_hits()

/home/nathan/rb/site/./lego/models/sets.py in inc_hits(2637)
  self.save()

SELECT "lego_setstatshistory"."id",
       "lego_setstatshistory"."set_id",
       "lego_setstatshistory"."day",
       "lego_setstatshistory"."hits",
       "lego_setstatshistory"."builds",
       "lego_setstatshistory"."likes",
       "lego_setstatshistory"."bi_downloads",
       "lego_setstatshistory"."featured_hits",
       "lego_setstatshistory"."user_hits"
  FROM
"lego_setstatshistory"
 WHERE
("lego_setstatshistory"."day" = '2026-01-22'::date AND "lego_setstatshistory"."set_id" = 270817)
 LIMIT
21
SELECT ••• FROM "lego_setstatshistory" WHERE ("lego_setstatshistory"."day" = '2026-01-22'::date AND "lego_setstatshistory"."set_id" = 270817) LIMIT 21
0.42

Connection: default

Transaction status: In transaction

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(384)
  set.stats.inc_hits()

/home/nathan/rb/site/./lego/models/sets.py in inc_hits(2638)
  SetStatsHistory.inc_hits(self.set)

/home/nathan/rb/site/./lego/models/sets.py in inc_hits(2587)
  self, created = cls.objects.get_or_create(set=set, day=timezone.now())

SAVEPOINT "s135227521288000_x37"SAVEPOINT "s135227521288000_x37"
0.04

Connection: default

Transaction status: In transaction

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(384)
  set.stats.inc_hits()

/home/nathan/rb/site/./lego/models/sets.py in inc_hits(2638)
  SetStatsHistory.inc_hits(self.set)

/home/nathan/rb/site/./lego/models/sets.py in inc_hits(2587)
  self, created = cls.objects.get_or_create(set=set, day=timezone.now())

INSERT INTO "lego_setstatshistory" ("set_id", "day", "hits", "builds", "likes", "bi_downloads", "featured_hits", "user_hits")
VALUES
(270817, '2026-01-22'::date, 0, 0, 0, 0, 0, 0) RETURNING "lego_setstatshistory"."id"
INSERT INTO "lego_setstatshistory" ("set_id", "day", "hits", "builds", "likes", "bi_downloads", "featured_hits", "user_hits") VALUES (270817, '2026-01-22'::date, 0, 0, 0, 0, 0, 0) RETURNING "lego_setstatshistory"."id"
0.27

Connection: default

Transaction status: In transaction

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(384)
  set.stats.inc_hits()

/home/nathan/rb/site/./lego/models/sets.py in inc_hits(2638)
  SetStatsHistory.inc_hits(self.set)

/home/nathan/rb/site/./lego/models/sets.py in inc_hits(2587)
  self, created = cls.objects.get_or_create(set=set, day=timezone.now())

RELEASE SAVEPOINT "s135227521288000_x37"RELEASE SAVEPOINT "s135227521288000_x37"
0.03

Connection: default

Transaction status: In transaction

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(384)
  set.stats.inc_hits()

/home/nathan/rb/site/./lego/models/sets.py in inc_hits(2638)
  SetStatsHistory.inc_hits(self.set)

/home/nathan/rb/site/./lego/models/sets.py in inc_hits(2587)
  self, created = cls.objects.get_or_create(set=set, day=timezone.now())

UPDATE "lego_setstatshistory"
   SET
"set_id" = 270817,
       "day" = '2026-01-22'::date,
       "hits" = 1,
       "builds" = 0,
       "likes" = 0,
       "bi_downloads" = 0,
       "featured_hits" = 0,
       "user_hits" = 0
 WHERE
"lego_setstatshistory"."id" = 140924231
UPDATE "lego_setstatshistory" SET "set_id" = 270817, "day" = '2026-01-22'::date, "hits" = 1, "builds" = 0, "likes" = 0, "bi_downloads" = 0, "featured_hits" = 0, "user_hits" = 0 WHERE "lego_setstatshistory"."id" = 140924231
0.11

Connection: default

Transaction status: In transaction

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(384)
  set.stats.inc_hits()

/home/nathan/rb/site/./lego/models/sets.py in inc_hits(2638)
  SetStatsHistory.inc_hits(self.set)

/home/nathan/rb/site/./lego/models/sets.py in inc_hits(2589)
  self.save()

SELECT "lego_theme"."id",
       "lego_theme"."parent_id",
       "lego_theme"."name",
       "lego_theme"."slug",
       "lego_theme"."set_count",
       "lego_theme"."t1_id",
       "lego_theme"."t1_name",
       "lego_theme"."t2_name",
       "lego_theme"."t3_name",
       "lego_theme"."lego_blurb",
       "lego_theme"."banner_img",
       "lego_theme"."descr"
  FROM
"lego_theme"
 WHERE
"lego_theme"."id" = 672
 LIMIT
21
SELECT ••• FROM "lego_theme" WHERE "lego_theme"."id" = 672 LIMIT 21
2 similar queries.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(419)
  context['similar_sets'] = set.get_similar_sets(10)

/home/nathan/rb/site/./cache/utils.py in cache_wrapper(98)
  result = method(instance, *args, **kwargs)

/home/nathan/rb/site/./lego/models/sets.py in get_similar_sets(1350)
  """, {'theme': self.theme.name,

SELECT DISTINCT "taggit_tag"."id",
       "taggit_tag"."name",
       "taggit_tag"."slug",
       COUNT("lego_set"."baseset_ptr_id") AS "count"
  FROM
"taggit_tag"
 INNER JOIN
"taggit_taggeditem"
    ON
("taggit_tag"."id" = "taggit_taggeditem"."tag_id")
 INNER JOIN
"django_content_type"
    ON
("taggit_taggeditem"."content_type_id" = "django_content_type"."id")
  LEFT OUTER JOIN
"lego_baseset"
    ON
("taggit_taggeditem"."object_id" = "lego_baseset"."id" AND ("taggit_taggeditem"."content_type_id" IN (18,63,17,22,20,31,50,180)))
  LEFT OUTER JOIN
"lego_set"
    ON
("lego_baseset"."id" = "lego_set"."baseset_ptr_id")
 INNER JOIN
"taggit_taggeditem" T6
    ON
("taggit_tag"."id" = T6."tag_id")
 INNER JOIN
"lego_baseset" T7
    ON
(T6."object_id" = T7."id" AND (T6."content_type_id" IN (18,63,17,22,20,31,50,180)))
 INNER JOIN
"lego_set" T8
    ON
(T7."id" = T8."baseset_ptr_id")
 WHERE
("django_content_type"."app_label" = 'lego' AND "django_content_type"."model" = 'set' AND T8."baseset_ptr_id" = 270817)
 GROUP BY
"taggit_tag"."id"
SELECT ••• FROM "taggit_tag" INNER JOIN "taggit_taggeditem" ON ("taggit_tag"."id" = "taggit_taggeditem"."tag_id") INNER JOIN "django_content_type" ON ("taggit_taggeditem"."content_type_id" = "django_content_type"."id") LEFT OUTER JOIN "lego_baseset" ON ("taggit_taggeditem"."object_id" = "lego_baseset"."id" AND ("taggit_taggeditem"."content_type_id" IN (18,63,17,22,20,31,50,180))) LEFT OUTER JOIN "lego_set" ON ("lego_baseset"."id" = "lego_set"."baseset_ptr_id") INNER JOIN "taggit_taggeditem" T6 ON ("taggit_tag"."id" = T6."tag_id") INNER JOIN "lego_baseset" T7 ON (T6."object_id" = T7."id" AND (T6."content_type_id" IN (18,63,17,22,20,31,50,180))) INNER JOIN "lego_set" T8 ON (T7."id" = T8."baseset_ptr_id") WHERE ("django_content_type"."app_label" = 'lego' AND "django_content_type"."model" = 'set' AND T8."baseset_ptr_id" = 270817) GROUP BY "taggit_tag"."id"
56.75

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(419)
  context['similar_sets'] = set.get_similar_sets(10)

/home/nathan/rb/site/./cache/utils.py in cache_wrapper(98)
  result = method(instance, *args, **kwargs)

/home/nathan/rb/site/./lego/models/sets.py in get_similar_sets(1352)
  'tag_ids': ' '.join(str(t.id) for t in self.get_tags() if t.id != 4),  # 4 == moc


   set
pg_trgm.similarity_threshold = 0.2; SELECT "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."num_parts",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."set_type",
       "lego_baseset"."primary_photo_id",
       "lego_setstatstotal"."likes",
       lego_theme.name as theme_name,
       lego_theme.parent_id as theme_parent,
       lego_baseset.id,
       (SIMILARITY ("lego_baseset"."name", 'Medieval Horse Knight Castle')*5 + similarity(coalesce(( select string_agg(tag_id::text, ' ') as tags from taggit_taggeditem where content_type_id in (17,18,22,63,31,180) and object_id=lego_baseset.id ),''), '32 51 59 201 989 1689 2343 2404 2556 2672 3392 5131 7256 12100 55400')*5 + similarity("lego_theme"."name", 'Creator 3-in-1')/3 + similarity(coalesce("lego_theme"."parent_id",0)::text, '22')/2 + similarity(substr("lego_baseset"."descr",0,100), '')) * least(likes/hits::float, 0.002) as similarity
  FROM
lego_baseset
 INNER JOIN
"lego_setstatstotal"
    ON
("lego_baseset"."id" = "lego_setstatstotal"."set_id")
 INNER JOIN
"lego_theme"
    ON
("lego_baseset"."theme_id" = "lego_theme"."id")
 WHERE
"lego_setstatstotal"."likes" > 50
   AND
"lego_setstatstotal"."hits" > 0
   AND
"lego_baseset"."is_active" = true
   AND
((lego_baseset.name || ' ' || lego_baseset.theme_id::text) % 'Medieval Horse Knight Castle 672')
 ORDER BY
"similarity" DESC, "lego_setstatstotal"."likes" DESC, "lego_baseset"."num_parts" DESC
 LIMIT
10
set pg_trgm.similarity_threshold = 0.2; SELECT "lego_baseset"."set_num", "lego_baseset"."name", "lego_baseset"."year", "lego_baseset"."theme_id", "lego_baseset"."num_parts", "lego_baseset"."is_active", "lego_baseset"."is_accessory", "lego_baseset"."added_dt", "lego_baseset"."added_by_id", "lego_baseset"."last_modified_dt", "lego_baseset"."last_modified_by_id", "lego_baseset"."set_type", "lego_baseset"."primary_photo_id", "lego_setstatstotal"."likes", lego_theme.name as theme_name, lego_theme.parent_id as theme_parent, lego_baseset.id, (SIMILARITY ("lego_baseset"."name", 'Medieval Horse Knight Castle')*5 + similarity(coalesce(( select string_agg(tag_id::text, ' ') as tags from taggit_taggeditem where content_type_id in (17,18,22,63,31,180) and object_id=lego_baseset.id ),''), '32 51 59 201 989 1689 2343 2404 2556 2672 3392 5131 7256 12100 55400')*5 + similarity("lego_theme"."name", 'Creator 3-in-1')/3 + similarity(coalesce("lego_theme"."parent_id",0)::text, '22')/2 + similarity(substr("lego_baseset"."descr",0,100), '')) * least(likes/hits::float, 0.002) as similarity FROM lego_baseset INNER JOIN "lego_setstatstotal" ON ("lego_baseset"."id" = "lego_setstatstotal"."set_id") INNER JOIN "lego_theme" ON ("lego_baseset"."theme_id" = "lego_theme"."id") WHERE "lego_setstatstotal"."likes" > 50 AND "lego_setstatstotal"."hits" > 0 AND "lego_baseset"."is_active" = true AND ((lego_baseset.name || ' ' || lego_baseset.theme_id::text) % 'Medieval Horse Knight Castle 672') ORDER BY "similarity" DESC, "lego_setstatstotal"."likes" DESC, "lego_baseset"."num_parts" DESC LIMIT 10
92.58

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(419)
  context['similar_sets'] = set.get_similar_sets(10)

/home/nathan/rb/site/./cache/utils.py in cache_wrapper(98)
  result = method(instance, *args, **kwargs)

/home/nathan/rb/site/./lego/models/sets.py in get_similar_sets(1361)
  qs = list(qs)

SELECT "lego_storesetitem"."id",
       "lego_storesetitem"."store_id",
       "lego_storesetitem"."is_used",
       "lego_storesetitem"."cost",
       "lego_storesetitem"."cost_usd",
       "lego_storesetitem"."sale_cost",
       "lego_storesetitem"."sku",
       "lego_storesetitem"."item_url",
       "lego_storesetitem"."quantity",
       "lego_storesetitem"."timestamp",
       "lego_storesetitem"."set_id",
       "lego_store"."id",
       "lego_store"."name",
       "lego_store"."is_active",
       "lego_store"."store_url",
       "lego_store"."add_item_url",
       "lego_store"."feed_url",
       "lego_store"."tag_line",
       "lego_store"."currency_code",
       "lego_store"."country_code",
       "lego_store"."bricklink_sellername",
       "lego_store"."ships_to"
  FROM
"lego_storesetitem"
 INNER JOIN
"lego_store"
    ON
("lego_storesetitem"."store_id" = "lego_store"."id")
 WHERE
(NOT "lego_storesetitem"."is_used" AND "lego_storesetitem"."set_id" = 270817 AND "lego_storesetitem"."store_id" IN (SELECT U0."id" FROM "lego_store" U0 WHERE (U0."is_active" AND UPPER(U0."store_url"::text) LIKE UPPER('%linksynergy.com%'))))
SELECT ••• FROM "lego_storesetitem" INNER JOIN "lego_store" ON ("lego_storesetitem"."store_id" = "lego_store"."id") WHERE (NOT "lego_storesetitem"."is_used" AND "lego_storesetitem"."set_id" = 270817 AND "lego_storesetitem"."store_id" IN (SELECT ••• FROM "lego_store" U0 WHERE (U0."is_active" AND UPPER(U0."store_url"::text) LIKE UPPER('%linksynergy.com%'))))
4 similar queries.
1.31

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(421)
  context['merchant_store_costs'] = get_merchant_stores_cost(request.user, set)

/home/nathan/rb/site/./lego/buy/sets.py in get_merchant_stores_cost(431)
  for item in items:

SELECT "countries_plus_country"."iso",
       "countries_plus_country"."iso3",
       "countries_plus_country"."iso_numeric",
       "countries_plus_country"."fips",
       "countries_plus_country"."name",
       "countries_plus_country"."capital",
       "countries_plus_country"."area",
       "countries_plus_country"."population",
       "countries_plus_country"."continent",
       "countries_plus_country"."tld",
       "countries_plus_country"."currency_code",
       "countries_plus_country"."currency_symbol",
       "countries_plus_country"."currency_name",
       "countries_plus_country"."phone",
       "countries_plus_country"."postal_code_format",
       "countries_plus_country"."postal_code_regex",
       "countries_plus_country"."languages",
       "countries_plus_country"."geonameid",
       "countries_plus_country"."neighbours",
       "countries_plus_country"."equivalent_fips_code"
  FROM
"countries_plus_country"
 WHERE
"countries_plus_country"."iso" = 'US'
 LIMIT
21
SELECT ••• FROM "countries_plus_country" WHERE "countries_plus_country"."iso" = 'US' LIMIT 21
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(421)
  context['merchant_store_costs'] = get_merchant_stores_cost(request.user, set)

/home/nathan/rb/site/./lego/buy/sets.py in get_merchant_stores_cost(443)
  item.cost = user.geo.format_user_currency(item.cost or 0, item.store.currency_code)

/home/nathan/rb/site/./geo/geo.py in format_user_currency(287)
  price = self.to_user_currency(price, from_currency_code)

/home/nathan/rb/site/./geo/geo.py in to_user_currency(263)
  user_currency = self.get_user_currency()

/home/nathan/rb/site/./geo/geo.py in get_user_currency(252)
  country = Country.objects.get(iso=country_code)

SELECT "lego_storesetitem"."id",
       "lego_storesetitem"."store_id",
       "lego_storesetitem"."is_used",
       "lego_storesetitem"."cost",
       "lego_storesetitem"."cost_usd",
       "lego_storesetitem"."sale_cost",
       "lego_storesetitem"."sku",
       "lego_storesetitem"."item_url",
       "lego_storesetitem"."quantity",
       "lego_storesetitem"."timestamp",
       "lego_storesetitem"."set_id",
       "lego_store"."id",
       "lego_store"."name",
       "lego_store"."is_active",
       "lego_store"."store_url",
       "lego_store"."add_item_url",
       "lego_store"."feed_url",
       "lego_store"."tag_line",
       "lego_store"."currency_code",
       "lego_store"."country_code",
       "lego_store"."bricklink_sellername",
       "lego_store"."ships_to"
  FROM
"lego_storesetitem"
 INNER JOIN
"lego_store"
    ON
("lego_storesetitem"."store_id" = "lego_store"."id")
 WHERE
(NOT "lego_storesetitem"."is_used" AND "lego_storesetitem"."set_id" = 270817 AND "lego_storesetitem"."store_id" IN (SELECT U0."id" FROM "lego_store" U0 WHERE (U0."is_active" AND UPPER(U0."store_url"::text) LIKE UPPER('%brickowl.com%'))))
SELECT ••• FROM "lego_storesetitem" INNER JOIN "lego_store" ON ("lego_storesetitem"."store_id" = "lego_store"."id") WHERE (NOT "lego_storesetitem"."is_used" AND "lego_storesetitem"."set_id" = 270817 AND "lego_storesetitem"."store_id" IN (SELECT ••• FROM "lego_store" U0 WHERE (U0."is_active" AND UPPER(U0."store_url"::text) LIKE UPPER('%brickowl.com%'))))
4 similar queries.
0.53

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(421)
  context['merchant_store_costs'] = get_merchant_stores_cost(request.user, set)

/home/nathan/rb/site/./lego/buy/sets.py in get_merchant_stores_cost(431)
  for item in items:

SELECT "geo_currency"."id",
       "geo_currency"."code",
       "geo_currency"."rate"
  FROM
"geo_currency"
 WHERE
"geo_currency"."code" = 'CZK'
 LIMIT
21
SELECT ••• FROM "geo_currency" WHERE "geo_currency"."code" = 'CZK' LIMIT 21
0.23

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(421)
  context['merchant_store_costs'] = get_merchant_stores_cost(request.user, set)

/home/nathan/rb/site/./lego/buy/sets.py in get_merchant_stores_cost(443)
  item.cost = user.geo.format_user_currency(item.cost or 0, item.store.currency_code)

/home/nathan/rb/site/./geo/geo.py in format_user_currency(287)
  price = self.to_user_currency(price, from_currency_code)

/home/nathan/rb/site/./geo/geo.py in to_user_currency(270)
  return to_user_currency_the_slow_bit(cost, from_currency, user_currency['currency'])

/home/nathan/rb/site/./geo/geo.py in to_user_currency_the_slow_bit(268)
  return Currency.cost_from_to(cost, from_currency, user_currency)

/home/nathan/rb/site/./geo/models.py in cost_from_to(48)
  factor = cls.get_conversion_factor(from_currency_code, to_currency_code)

/home/nathan/rb/site/./cache/utils.py in cache_wrapper(98)
  result = method(instance, *args, **kwargs)

/home/nathan/rb/site/./geo/models.py in get_conversion_factor(35)
  from_currency_rate = cls.objects.get(code=from_currency_code).rate

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector"
  FROM
"lego_baseset"
 WHERE
"lego_baseset"."id" = 270817
 LIMIT
21
SELECT ••• FROM "lego_baseset" WHERE "lego_baseset"."id" = 270817 LIMIT 21
21 similar queries. Duplicated 16 times.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(421)
  context['merchant_store_costs'] = get_merchant_stores_cost(request.user, set)

/home/nathan/rb/site/./lego/buy/sets.py in get_merchant_stores_cost(447)
  item.item_url = item.get_store_item_url()

/home/nathan/rb/site/./lego/models/stores.py in get_store_item_url(401)
  return self.store.store_url.split('?')[0] + '/search/store?utm_source=rebrickable&query=' + self.set.set_num

SELECT "lego_storesetitem"."id",
       "lego_storesetitem"."store_id",
       "lego_storesetitem"."is_used",
       "lego_storesetitem"."cost",
       "lego_storesetitem"."cost_usd",
       "lego_storesetitem"."sale_cost",
       "lego_storesetitem"."sku",
       "lego_storesetitem"."item_url",
       "lego_storesetitem"."quantity",
       "lego_storesetitem"."timestamp",
       "lego_storesetitem"."set_id",
       "lego_store"."id",
       "lego_store"."name",
       "lego_store"."is_active",
       "lego_store"."store_url",
       "lego_store"."add_item_url",
       "lego_store"."feed_url",
       "lego_store"."tag_line",
       "lego_store"."currency_code",
       "lego_store"."country_code",
       "lego_store"."bricklink_sellername",
       "lego_store"."ships_to"
  FROM
"lego_storesetitem"
 INNER JOIN
"lego_store"
    ON
("lego_storesetitem"."store_id" = "lego_store"."id")
 WHERE
(NOT "lego_storesetitem"."is_used" AND "lego_storesetitem"."set_id" = 270817 AND "lego_storesetitem"."store_id" IN (SELECT U0."id" FROM "lego_store" U0 WHERE (U0."is_active" AND UPPER(U0."store_url"::text) LIKE UPPER('%bricklink.com%'))))
SELECT ••• FROM "lego_storesetitem" INNER JOIN "lego_store" ON ("lego_storesetitem"."store_id" = "lego_store"."id") WHERE (NOT "lego_storesetitem"."is_used" AND "lego_storesetitem"."set_id" = 270817 AND "lego_storesetitem"."store_id" IN (SELECT ••• FROM "lego_store" U0 WHERE (U0."is_active" AND UPPER(U0."store_url"::text) LIKE UPPER('%bricklink.com%'))))
4 similar queries.
0.52

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(421)
  context['merchant_store_costs'] = get_merchant_stores_cost(request.user, set)

/home/nathan/rb/site/./lego/buy/sets.py in get_merchant_stores_cost(431)
  for item in items:

SELECT "lego_storesetitem"."id",
       "lego_storesetitem"."store_id",
       "lego_storesetitem"."is_used",
       "lego_storesetitem"."cost",
       "lego_storesetitem"."cost_usd",
       "lego_storesetitem"."sale_cost",
       "lego_storesetitem"."sku",
       "lego_storesetitem"."item_url",
       "lego_storesetitem"."quantity",
       "lego_storesetitem"."timestamp",
       "lego_storesetitem"."set_id",
       "lego_store"."id",
       "lego_store"."name",
       "lego_store"."is_active",
       "lego_store"."store_url",
       "lego_store"."add_item_url",
       "lego_store"."feed_url",
       "lego_store"."tag_line",
       "lego_store"."currency_code",
       "lego_store"."country_code",
       "lego_store"."bricklink_sellername",
       "lego_store"."ships_to"
  FROM
"lego_storesetitem"
 INNER JOIN
"lego_store"
    ON
("lego_storesetitem"."store_id" = "lego_store"."id")
 WHERE
(NOT "lego_storesetitem"."is_used" AND "lego_storesetitem"."set_id" = 270817 AND "lego_storesetitem"."store_id" IN (SELECT U0."id" FROM "lego_store" U0 WHERE (U0."is_active" AND UPPER(U0."store_url"::text) LIKE UPPER('%www.amazon.%'))))
SELECT ••• FROM "lego_storesetitem" INNER JOIN "lego_store" ON ("lego_storesetitem"."store_id" = "lego_store"."id") WHERE (NOT "lego_storesetitem"."is_used" AND "lego_storesetitem"."set_id" = 270817 AND "lego_storesetitem"."store_id" IN (SELECT ••• FROM "lego_store" U0 WHERE (U0."is_active" AND UPPER(U0."store_url"::text) LIKE UPPER('%www.amazon.%'))))
4 similar queries.
0.84

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(421)
  context['merchant_store_costs'] = get_merchant_stores_cost(request.user, set)

/home/nathan/rb/site/./lego/buy/sets.py in get_merchant_stores_cost(431)
  for item in items:

SELECT "lego_store"."id",
       "lego_store"."name",
       "lego_store"."is_active",
       "lego_store"."store_url",
       "lego_store"."add_item_url",
       "lego_store"."feed_url",
       "lego_store"."tag_line",
       "lego_store"."currency_code",
       "lego_store"."country_code",
       "lego_store"."bricklink_sellername",
       "lego_store"."ships_to"
  FROM
"lego_store"
 WHERE
("lego_store"."is_active" AND "lego_store"."country_code" = 'US' AND UPPER("lego_store"."store_url"::text) LIKE UPPER('%linksynergy.com%'))
 LIMIT
21
SELECT ••• FROM "lego_store" WHERE ("lego_store"."is_active" AND "lego_store"."country_code" = 'US' AND UPPER("lego_store"."store_url"::text) LIKE UPPER('%linksynergy.com%')) LIMIT 21
11.86

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(421)
  context['merchant_store_costs'] = get_merchant_stores_cost(request.user, set)

/home/nathan/rb/site/./lego/buy/sets.py in get_merchant_stores_cost(456)
  res['img_link'] = MerchantStore.get_lego_link_for_user(user, set)

/home/nathan/rb/site/./lego/models/stores.py in get_lego_link_for_user(274)
  store = get_or_none(Store.objects, store_url__icontains='linksynergy.com', country_code=store_country)

/home/nathan/rb/site/./rb/utils.py in get_or_none(605)
  return manager.get(**kwargs)

SELECT "lego_storesetitem"."id",
       "lego_storesetitem"."store_id",
       "lego_storesetitem"."is_used",
       "lego_storesetitem"."cost",
       "lego_storesetitem"."cost_usd",
       "lego_storesetitem"."sale_cost",
       "lego_storesetitem"."sku",
       "lego_storesetitem"."item_url",
       "lego_storesetitem"."quantity",
       "lego_storesetitem"."timestamp",
       "lego_storesetitem"."set_id",
       "lego_store"."id",
       "lego_store"."name",
       "lego_store"."is_active",
       "lego_store"."store_url",
       "lego_store"."add_item_url",
       "lego_store"."feed_url",
       "lego_store"."tag_line",
       "lego_store"."currency_code",
       "lego_store"."country_code",
       "lego_store"."bricklink_sellername",
       "lego_store"."ships_to"
  FROM
"lego_storesetitem"
 INNER JOIN
"lego_store"
    ON
("lego_storesetitem"."store_id" = "lego_store"."id")
 WHERE
(NOT "lego_storesetitem"."is_used" AND "lego_storesetitem"."set_id" = 270817 AND "lego_storesetitem"."store_id" = 17)
 ORDER BY
"lego_storesetitem"."id" ASC
 LIMIT
1
SELECT ••• FROM "lego_storesetitem" INNER JOIN "lego_store" ON ("lego_storesetitem"."store_id" = "lego_store"."id") WHERE (NOT "lego_storesetitem"."is_used" AND "lego_storesetitem"."set_id" = 270817 AND "lego_storesetitem"."store_id" = 17) ORDER BY "lego_storesetitem"."id" ASC LIMIT 1
1.00

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(421)
  context['merchant_store_costs'] = get_merchant_stores_cost(request.user, set)

/home/nathan/rb/site/./lego/buy/sets.py in get_merchant_stores_cost(456)
  res['img_link'] = MerchantStore.get_lego_link_for_user(user, set)

/home/nathan/rb/site/./lego/models/stores.py in get_lego_link_for_user(278)
  item = StoreSetItem.objects.select_related('store').filter(store=store, set_id=set.id, is_used=False).first()

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "lego_inventory"."id" AS "inventory2",
       "lego_invset"."quantity" AS "quantity",
       "lego_theme"."id",
       "lego_theme"."parent_id",
       "lego_theme"."name",
       "lego_theme"."slug",
       "lego_theme"."set_count",
       "lego_theme"."t1_id",
       "lego_theme"."t1_name",
       "lego_theme"."t2_name",
       "lego_theme"."t3_name",
       "lego_theme"."lego_blurb",
       "lego_theme"."banner_img",
       "lego_theme"."descr",
       T6."id",
       T6."parent_id",
       T6."name",
       T6."slug",
       T6."set_count",
       T6."t1_id",
       T6."t1_name",
       T6."t2_name",
       T6."t3_name",
       T6."lego_blurb",
       T6."banner_img",
       T6."descr",
       T7."id",
       T7."parent_id",
       T7."name",
       T7."slug",
       T7."set_count",
       T7."t1_id",
       T7."t1_name",
       T7."t2_name",
       T7."t3_name",
       T7."lego_blurb",
       T7."banner_img",
       T7."descr",
       "lego_setstatstotal"."set_id",
       "lego_setstatstotal"."hits",
       "lego_setstatstotal"."builds",
       "lego_setstatstotal"."likes",
       "lego_setstatstotal"."bi_downloads",
       "lego_setstatstotal"."featured_hits",
       "lego_setstatstotal"."user_hits"
  FROM
"lego_baseset"
 INNER JOIN
"lego_inventory"
    ON
("lego_baseset"."id" = "lego_inventory"."set_id")
 INNER JOIN
"lego_invset"
    ON
("lego_inventory"."id" = "lego_invset"."inventory_id")
 INNER JOIN
"lego_theme"
    ON
("lego_baseset"."theme_id" = "lego_theme"."id")
  LEFT OUTER JOIN
"lego_theme" T6
    ON
("lego_theme"."parent_id" = T6."id")
  LEFT OUTER JOIN
"lego_theme" T7
    ON
(T6."parent_id" = T7."id")
  LEFT OUTER JOIN
"lego_setstatstotal"
    ON
("lego_baseset"."id" = "lego_setstatstotal"."set_id")
 WHERE
("lego_baseset"."is_active" AND "lego_inventory"."is_active" AND "lego_invset"."inv_set_id" = 270817 AND "lego_baseset"."set_type" = 'Set')
 ORDER BY
"lego_baseset"."name" ASC
SELECT ••• FROM "lego_baseset" INNER JOIN "lego_inventory" ON ("lego_baseset"."id" = "lego_inventory"."set_id") INNER JOIN "lego_invset" ON ("lego_inventory"."id" = "lego_invset"."inventory_id") INNER JOIN "lego_theme" ON ("lego_baseset"."theme_id" = "lego_theme"."id") LEFT OUTER JOIN "lego_theme" T6 ON ("lego_theme"."parent_id" = T6."id") LEFT OUTER JOIN "lego_theme" T7 ON (T6."parent_id" = T7."id") LEFT OUTER JOIN "lego_setstatstotal" ON ("lego_baseset"."id" = "lego_setstatstotal"."set_id") WHERE ("lego_baseset"."is_active" AND "lego_inventory"."is_active" AND "lego_invset"."inv_set_id" = 270817 AND "lego_baseset"."set_type" = 'Set') ORDER BY "lego_baseset"."name" ASC
1.28

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(430)
  for s in context['parent_sets']:

SELECT "lego_setmap"."id",
       "lego_setmap"."set_id",
       "lego_setmap"."ext_system",
       "lego_setmap"."ext_id"
  FROM
"lego_setmap"
 WHERE
"lego_setmap"."set_id" = 270817
SELECT ••• FROM "lego_setmap" WHERE "lego_setmap"."set_id" = 270817
0.28

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(445)
  context['mappings'] = set.get_ext_mappings()

/home/nathan/rb/site/./lego/models/sets.py in get_ext_mappings(1988)
  for set_map in SetMap.objects.filter(set=self):

SELECT "lego_theme"."id",
       "lego_theme"."parent_id",
       "lego_theme"."name",
       "lego_theme"."slug",
       "lego_theme"."set_count",
       "lego_theme"."t1_id",
       "lego_theme"."t1_name",
       "lego_theme"."t2_name",
       "lego_theme"."t3_name",
       "lego_theme"."lego_blurb",
       "lego_theme"."banner_img",
       "lego_theme"."descr"
  FROM
"lego_theme"
 WHERE
"lego_theme"."id" = 22
 LIMIT
21
SELECT ••• FROM "lego_theme" WHERE "lego_theme"."id" = 22 LIMIT 21
2 similar queries.
0.51

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/models/sets.py in __str__(153)
  if self.parent:

8 {% load static %}
9 {% load thumbs %}
10
11 {% block pagetitle %}LEGO Set {{ set.set_num }} {{ set.name }}{% if not set.is_figure %} ({{ set.year }} {{ set.theme }}){% endif %}{% endblock pagetitle %}
12 {% block page-header %}LEGO SET {{ set.set_num }} - {{ set.name }}{% endblock page-header %}
13 {% block canonical_url %}{% build_absolute_uri set.get_absolute_url %}{% endblock %}
14
15 {% block breadcrumbs %}

/home/nathan/rb/site/lego/templates/sets/set_details.html

SELECT "lego_setphoto"."id",
       "lego_setphoto"."set_id",
       "lego_setphoto"."photo_type_id",
       "lego_setphoto"."submitted_by_id",
       "lego_setphoto"."timestamp",
       "lego_setphoto"."is_active",
       "lego_setphoto"."is_primary"
  FROM
"lego_setphoto"
 WHERE
"lego_setphoto"."id" = 155213
 LIMIT
21
SELECT ••• FROM "lego_setphoto" WHERE "lego_setphoto"."id" = 155213 LIMIT 21
3 similar queries.
0.19

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/models/sets.py in img_dir(751)
  file_dir = self.primary_photo.get_img_dir()

34 {% block meta_description %}LEGO Set {{ set.set_num }} {{ set.name }} - building instructions and parts inventory.{% endblock meta_description %}
35 {% block meta_og_description %}LEGO Set {{ set.set_num }} {{ set.name }} - building instructions and parts inventory.{% endblock meta_og_description %}
36 {% block meta_image %}{% spaceless %}
37 {% if set.img_dir %}
38 {% thumbs set.img_dir settings.THUMBS_OPTIONS_SET_MAIN as img %}{{ img.url }}
39 {% endif %}
40 {% endspaceless %}{% endblock meta_image %}
41

/home/nathan/rb/site/lego/templates/sets/set_details.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector"
  FROM
"lego_baseset"
 WHERE
"lego_baseset"."id" = 270817
 LIMIT
21
SELECT ••• FROM "lego_baseset" WHERE "lego_baseset"."id" = 270817 LIMIT 21
21 similar queries. Duplicated 16 times.
0.17

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/models/sets.py in img_dir(751)
  file_dir = self.primary_photo.get_img_dir()

/home/nathan/rb/site/./lego/models/sets.py in get_img_dir(3133)
  return os.path.join('sets', self.set.set_num.lower(), str(self.id) + '.jpg')

34 {% block meta_description %}LEGO Set {{ set.set_num }} {{ set.name }} - building instructions and parts inventory.{% endblock meta_description %}
35 {% block meta_og_description %}LEGO Set {{ set.set_num }} {{ set.name }} - building instructions and parts inventory.{% endblock meta_og_description %}
36 {% block meta_image %}{% spaceless %}
37 {% if set.img_dir %}
38 {% thumbs set.img_dir settings.THUMBS_OPTIONS_SET_MAIN as img %}{{ img.url }}
39 {% endif %}
40 {% endspaceless %}{% endblock meta_image %}
41

/home/nathan/rb/site/lego/templates/sets/set_details.html

SELECT COUNT(*) AS "__count"
  FROM
"lego_setphoto"
 WHERE
("lego_setphoto"."is_active" AND "lego_setphoto"."set_id" = 270817)
SELECT ••• FROM "lego_setphoto" WHERE ("lego_setphoto"."is_active" AND "lego_setphoto"."set_id" = 270817)
0.21

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

73
74 {% else %}
75
76 {% if set.photos.count > 1 %}
77 {# Setup slider to move through multiple Set images #}
78 {# flexsliderX to avoid initialisation until we have loaded all images #}
79 <div class="row">
80 <div class="col-xs-12"> {# here so the nav arrows are positioned properly #}

/home/nathan/rb/site/lego/templates/sets/includes/render_set_main_top.html

SELECT "lego_setphoto"."id",
       "lego_setphoto"."set_id",
       "lego_setphoto"."photo_type_id",
       "lego_setphoto"."submitted_by_id",
       "lego_setphoto"."timestamp",
       "lego_setphoto"."is_active",
       "lego_setphoto"."is_primary"
  FROM
"lego_setphoto"
 WHERE
("lego_setphoto"."is_active" AND "lego_setphoto"."set_id" = 270817)
 ORDER BY
"lego_setphoto"."is_primary" DESC, "lego_setphoto"."is_active" DESC, "lego_setphoto"."timestamp" ASC
SELECT ••• FROM "lego_setphoto" WHERE ("lego_setphoto"."is_active" AND "lego_setphoto"."set_id" = 270817) ORDER BY "lego_setphoto"."is_primary" DESC, "lego_setphoto"."is_active" DESC, "lego_setphoto"."timestamp" ASC
2 similar queries. Duplicated 2 times.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

82 <div class="flexslider text-center" data-controlNav="thumbnails" data-pauseOnHover="true"
83 data-directionNav="true" data-controlsContainer="#slider_controls">
84 <ul class="slides display-flex">
85 {% for photo in set.photos.all %} {# primary sorted first #}
86 {% thumbs photo.get_img_dir settings.THUMBS_OPTIONS_SET_MAIN_SM as tn_img %}
87 {% if forloop.counter == 1 %}
88 {% thumbs_encoded photo.get_img_dir settings.THUMBS_OPTIONS_SET_MAIN_PREVIEW as preview_img %}
89 {% thumbs photo.get_img_dir settings.THUMBS_OPTIONS_SET_MAIN get_real_dims=1 as first_image %}

/home/nathan/rb/site/lego/templates/sets/includes/render_set_main_top.html

SELECT "lego_setphototype"."id",
       "lego_setphototype"."name"
  FROM
"lego_setphototype"
 WHERE
"lego_setphototype"."id" = 3
 LIMIT
21
SELECT ••• FROM "lego_setphototype" WHERE "lego_setphototype"."id" = 3 LIMIT 21
0.32

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

91 <li data-thumb="{% cachebuster tn_img.url %}">
92 <a href="{{ merchant_store_costs.img_link|default:'' }}" target="_blank">
93 <img class="img-responsive" style="background-image:url('data:image;base64,{{ preview_img }}');background-size:contain;background-repeat:no-repeat"
94 title="LEGO Set {{ set }}{% if photo.photo_type %} ({{ photo.photo_type.name }}){% endif %}"
95 alt="LEGO Set {{ set }}{% if photo.photo_type %} ({{ photo.photo_type.name }}){% endif %}"
96 onload="this.style.backgroundImage=''" {# so transparent images dont have blurry bg #}
97 src="{% cachebuster first_image.url %}"
98 width="{{ first_image.width }}px" height="{{ first_image.height }}px">

/home/nathan/rb/site/lego/templates/sets/includes/render_set_main_top.html

SELECT "lego_setphoto"."id",
       "lego_setphoto"."set_id",
       "lego_setphoto"."photo_type_id",
       "lego_setphoto"."submitted_by_id",
       "lego_setphoto"."timestamp",
       "lego_setphoto"."is_active",
       "lego_setphoto"."is_primary"
  FROM
"lego_setphoto"
 WHERE
("lego_setphoto"."is_active" AND "lego_setphoto"."set_id" = 270817)
 ORDER BY
"lego_setphoto"."is_primary" DESC, "lego_setphoto"."is_active" DESC, "lego_setphoto"."timestamp" ASC
SELECT ••• FROM "lego_setphoto" WHERE ("lego_setphoto"."is_active" AND "lego_setphoto"."set_id" = 270817) ORDER BY "lego_setphoto"."is_primary" DESC, "lego_setphoto"."is_active" DESC, "lego_setphoto"."timestamp" ASC
2 similar queries. Duplicated 2 times.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

115 </ul>
116 </div>
117 {# pre-create controls div so we can size column height without CLS impact and prevents flicker #}
118 <div class="flexslider-controls-container-sets {% if set.photos.all|length > 6 %}flexslider-controls-container-sets-2rows{% endif %}">
119 <div id="slider_controls" class="text-center"></div>
120 </div>
121 </div>
122 </div>

/home/nathan/rb/site/lego/templates/sets/includes/render_set_main_top.html

select prev_num,
       next_num
  from
(
        select set_num,
               lag(set_num) over (order by theme_id, set_num) as prev_num,
               lead(set_num) over (order by theme_id, set_num) as next_num
          from
(
                select set_num,
                       theme_id,
                       nullif(regexp_replace(substring(set_num, 0, position('-' in set_num)), '[^0-9]', '', 'g'), '')::bigint as int_num
                  from
lego_baseset
                 where
set_type in ('Set')
               ) x
       ) y
 where
set_num = '31168-1'
select prev_num, next_num from ( select set_num, lag(set_num) over (order by theme_id, set_num) as prev_num, lead(set_num) over (order by theme_id, set_num) as next_num from ( select set_num, theme_id, nullif(regexp_replace(substring(set_num, 0, position('-' in set_num)), '[^0-9]', '', 'g'), '')::bigint as int_num from lego_baseset where set_type in ('Set') ) x ) y where set_num = '31168-1'
87.19

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./cache/utils.py in cache_wrapper(98)
  result = method(instance, *args, **kwargs)

/home/nathan/rb/site/./lego/models/sets.py in get_next_prev_sets(601)
  rows = run_sql(sql)

/home/nathan/rb/site/./rb/utils.py in run_sql(664)
  cursor.execute(sql, params)

12 <h3 class="text-center mb-0">
13 {{ set.set_num }}
14 </h3>
15 {% with set.get_next_prev_sets as next_prev_sets %}
16 <div class="flex-row mb-30">
17 {% if next_prev_sets.0 %}
18 <div class="flex-grow">
19 <span class="size-12x trunc" title="{{ next_prev_sets.0.set }}"><a href="{{ next_prev_sets.0.get_absolute_url }}"><i class="fa fa-chevron-left"></i> {{ next_prev_sets.0.set_num }}</a></span>

/home/nathan/rb/site/lego/templates/sets/includes/render_set_sidebar_top.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "lego_theme"."id",
       "lego_theme"."parent_id",
       "lego_theme"."name",
       "lego_theme"."slug",
       "lego_theme"."set_count",
       "lego_theme"."t1_id",
       "lego_theme"."t1_name",
       "lego_theme"."t2_name",
       "lego_theme"."t3_name",
       "lego_theme"."lego_blurb",
       "lego_theme"."banner_img",
       "lego_theme"."descr",
       T3."id",
       T3."parent_id",
       T3."name",
       T3."slug",
       T3."set_count",
       T3."t1_id",
       T3."t1_name",
       T3."t2_name",
       T3."t3_name",
       T3."lego_blurb",
       T3."banner_img",
       T3."descr",
       T4."id",
       T4."parent_id",
       T4."name",
       T4."slug",
       T4."set_count",
       T4."t1_id",
       T4."t1_name",
       T4."t2_name",
       T4."t3_name",
       T4."lego_blurb",
       T4."banner_img",
       T4."descr",
       "lego_setstatstotal"."set_id",
       "lego_setstatstotal"."hits",
       "lego_setstatstotal"."builds",
       "lego_setstatstotal"."likes",
       "lego_setstatstotal"."bi_downloads",
       "lego_setstatstotal"."featured_hits",
       "lego_setstatstotal"."user_hits"
  FROM
"lego_baseset"
 INNER JOIN
"lego_theme"
    ON
("lego_baseset"."theme_id" = "lego_theme"."id")
  LEFT OUTER JOIN
"lego_theme" T3
    ON
("lego_theme"."parent_id" = T3."id")
  LEFT OUTER JOIN
"lego_theme" T4
    ON
(T3."parent_id" = T4."id")
  LEFT OUTER JOIN
"lego_setstatstotal"
    ON
("lego_baseset"."id" = "lego_setstatstotal"."set_id")
 WHERE
("lego_baseset"."is_active" AND "lego_baseset"."set_num" = '31167-1')
 LIMIT
21
SELECT ••• FROM "lego_baseset" INNER JOIN "lego_theme" ON ("lego_baseset"."theme_id" = "lego_theme"."id") LEFT OUTER JOIN "lego_theme" T3 ON ("lego_theme"."parent_id" = T3."id") LEFT OUTER JOIN "lego_theme" T4 ON (T3."parent_id" = T4."id") LEFT OUTER JOIN "lego_setstatstotal" ON ("lego_baseset"."id" = "lego_setstatstotal"."set_id") WHERE ("lego_baseset"."is_active" AND "lego_baseset"."set_num" = '31167-1') LIMIT 21
2 similar queries.
0.60

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./cache/utils.py in cache_wrapper(98)
  result = method(instance, *args, **kwargs)

/home/nathan/rb/site/./lego/models/sets.py in get_next_prev_sets(603)
  return get_or_none(BaseSet.objects, set_num=prev_num), get_or_none(BaseSet.objects, set_num=next_num)

/home/nathan/rb/site/./rb/utils.py in get_or_none(605)
  return manager.get(**kwargs)

12 <h3 class="text-center mb-0">
13 {{ set.set_num }}
14 </h3>
15 {% with set.get_next_prev_sets as next_prev_sets %}
16 <div class="flex-row mb-30">
17 {% if next_prev_sets.0 %}
18 <div class="flex-grow">
19 <span class="size-12x trunc" title="{{ next_prev_sets.0.set }}"><a href="{{ next_prev_sets.0.get_absolute_url }}"><i class="fa fa-chevron-left"></i> {{ next_prev_sets.0.set_num }}</a></span>

/home/nathan/rb/site/lego/templates/sets/includes/render_set_sidebar_top.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "lego_theme"."id",
       "lego_theme"."parent_id",
       "lego_theme"."name",
       "lego_theme"."slug",
       "lego_theme"."set_count",
       "lego_theme"."t1_id",
       "lego_theme"."t1_name",
       "lego_theme"."t2_name",
       "lego_theme"."t3_name",
       "lego_theme"."lego_blurb",
       "lego_theme"."banner_img",
       "lego_theme"."descr",
       T3."id",
       T3."parent_id",
       T3."name",
       T3."slug",
       T3."set_count",
       T3."t1_id",
       T3."t1_name",
       T3."t2_name",
       T3."t3_name",
       T3."lego_blurb",
       T3."banner_img",
       T3."descr",
       T4."id",
       T4."parent_id",
       T4."name",
       T4."slug",
       T4."set_count",
       T4."t1_id",
       T4."t1_name",
       T4."t2_name",
       T4."t3_name",
       T4."lego_blurb",
       T4."banner_img",
       T4."descr",
       "lego_setstatstotal"."set_id",
       "lego_setstatstotal"."hits",
       "lego_setstatstotal"."builds",
       "lego_setstatstotal"."likes",
       "lego_setstatstotal"."bi_downloads",
       "lego_setstatstotal"."featured_hits",
       "lego_setstatstotal"."user_hits"
  FROM
"lego_baseset"
 INNER JOIN
"lego_theme"
    ON
("lego_baseset"."theme_id" = "lego_theme"."id")
  LEFT OUTER JOIN
"lego_theme" T3
    ON
("lego_theme"."parent_id" = T3."id")
  LEFT OUTER JOIN
"lego_theme" T4
    ON
(T3."parent_id" = T4."id")
  LEFT OUTER JOIN
"lego_setstatstotal"
    ON
("lego_baseset"."id" = "lego_setstatstotal"."set_id")
 WHERE
("lego_baseset"."is_active" AND "lego_baseset"."set_num" = '31169-1')
 LIMIT
21
SELECT ••• FROM "lego_baseset" INNER JOIN "lego_theme" ON ("lego_baseset"."theme_id" = "lego_theme"."id") LEFT OUTER JOIN "lego_theme" T3 ON ("lego_theme"."parent_id" = T3."id") LEFT OUTER JOIN "lego_theme" T4 ON (T3."parent_id" = T4."id") LEFT OUTER JOIN "lego_setstatstotal" ON ("lego_baseset"."id" = "lego_setstatstotal"."set_id") WHERE ("lego_baseset"."is_active" AND "lego_baseset"."set_num" = '31169-1') LIMIT 21
2 similar queries.
0.44

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./cache/utils.py in cache_wrapper(98)
  result = method(instance, *args, **kwargs)

/home/nathan/rb/site/./lego/models/sets.py in get_next_prev_sets(603)
  return get_or_none(BaseSet.objects, set_num=prev_num), get_or_none(BaseSet.objects, set_num=next_num)

/home/nathan/rb/site/./rb/utils.py in get_or_none(605)
  return manager.get(**kwargs)

12 <h3 class="text-center mb-0">
13 {{ set.set_num }}
14 </h3>
15 {% with set.get_next_prev_sets as next_prev_sets %}
16 <div class="flex-row mb-30">
17 {% if next_prev_sets.0 %}
18 <div class="flex-grow">
19 <span class="size-12x trunc" title="{{ next_prev_sets.0.set }}"><a href="{{ next_prev_sets.0.get_absolute_url }}"><i class="fa fa-chevron-left"></i> {{ next_prev_sets.0.set_num }}</a></span>

/home/nathan/rb/site/lego/templates/sets/includes/render_set_sidebar_top.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "lego_set"."baseset_ptr_id",
       "lego_set"."start_date",
       "lego_set"."end_date"
  FROM
"lego_set"
 INNER JOIN
"lego_baseset"
    ON
("lego_set"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
"lego_set"."baseset_ptr_id" = 270816
 LIMIT
21
SELECT ••• FROM "lego_set" INNER JOIN "lego_baseset" ON ("lego_set"."baseset_ptr_id" = "lego_baseset"."id") WHERE "lego_set"."baseset_ptr_id" = 270816 LIMIT 21
4 similar queries.
0.16

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

16 <div class="flex-row mb-30">
17 {% if next_prev_sets.0 %}
18 <div class="flex-grow">
19 <span class="size-12x trunc" title="{{ next_prev_sets.0.set }}"><a href="{{ next_prev_sets.0.get_absolute_url }}"><i class="fa fa-chevron-left"></i> {{ next_prev_sets.0.set_num }}</a></span>
20 </div>
21 {% endif %}
22 {% if next_prev_sets.1 %}
23 <div class="">

/home/nathan/rb/site/lego/templates/sets/includes/render_set_sidebar_top.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "lego_set"."baseset_ptr_id",
       "lego_set"."start_date",
       "lego_set"."end_date"
  FROM
"lego_set"
 INNER JOIN
"lego_baseset"
    ON
("lego_set"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
"lego_set"."baseset_ptr_id" = 247387
 LIMIT
21
SELECT ••• FROM "lego_set" INNER JOIN "lego_baseset" ON ("lego_set"."baseset_ptr_id" = "lego_baseset"."id") WHERE "lego_set"."baseset_ptr_id" = 247387 LIMIT 21
4 similar queries.
0.39

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

21 {% endif %}
22 {% if next_prev_sets.1 %}
23 <div class="">
24 <span class="size-12x pull-right trunc" title="{{ next_prev_sets.1.set }}"><a href="{{ next_prev_sets.1.get_absolute_url }}">{{ next_prev_sets.1.set_num }} <i class="fa fa-chevron-right"></i></a></span>
25 </div>
26 {% endif %}
27 </div>
28 {% endwith %}

/home/nathan/rb/site/lego/templates/sets/includes/render_set_sidebar_top.html

SELECT COUNT(*) AS "__count"
  FROM
"lego_inventory"
 WHERE
("lego_inventory"."is_active" AND "lego_inventory"."set_id" = 270817)
SELECT ••• FROM "lego_inventory" WHERE ("lego_inventory"."is_active" AND "lego_inventory"."set_id" = 270817)
0.30

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/models/sets.py in get_num_inventories(981)
  return Inventory.objects.filter(set=self).count()

67 {% endif %}
68 <tr>
69 <td>Inventory</td>
70 <td><a href="#parts_scroll">{{ set.num_parts }} parts{% if set.get_num_inventories > 1 %} <span class="label label-primary">v{{ inventory.version }}</span>{% endif %}</a></td>
71 </tr>
72 {% if set.is_figure %}
73 <tr>
74 <td>Found In</td>

/home/nathan/rb/site/lego/templates/sets/includes/render_set_sidebar_top.html

SELECT "blog_article"."id",
       "blog_article"."title",
       "blog_article"."author_id",
       "blog_article"."published_date",
       "blog_article"."is_active",
       "blog_article"."body",
       "blog_article"."meta_description",
       "blog_article"."meta_img",
       "blog_article"."slug",
       "blog_article"."category_id",
       "blog_article"."ads",
       "blog_article"."show_ads_for_set_num",
       "blog_article"."review_for_set_num",
       "blog_article"."status",
       "blog_article"."scheduled_net",
       "blog_article"."ready_for_review_date",
       "blog_article"."is_sensitive",
       "blog_article"."search_vector"
  FROM
"blog_article"
 WHERE
("blog_article"."is_active" AND "blog_article"."review_for_set_num"::text LIKE '%31168-1%')
 ORDER BY
"blog_article"."published_date" ASC
SELECT ••• FROM "blog_article" WHERE ("blog_article"."is_active" AND "blog_article"."review_for_set_num"::text LIKE '%31168-1%') ORDER BY "blog_article"."published_date" ASC
0.87

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/models/sets.py in get_set_review(1393)
  for review in reviews:

119 {% endif %}
120 </table>
121
122 {% with set.get_set_review as review %}
123 {% if review %}
124 <p>See our review:</p>
125 {% include 'blog/includes/render_posts_preview.html' with article=review %}
126 {% endif %}

/home/nathan/rb/site/lego/templates/sets/includes/render_set_sidebar_top.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined"
  FROM
"auth_user"
 WHERE
"auth_user"."id" = 375158
 LIMIT
21
SELECT ••• FROM "auth_user" WHERE "auth_user"."id" = 375158 LIMIT 21
3 similar queries.
0.17

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

25 <span>{{ article.published_date|date }}</span>
26 </li>
27 <li class="pull-right mr-0 hidden-sm hidden-xs">
28 <a href="{% url 'blog_by_author' article.author.get_username %}">
29 <i class="fa fa-user"></i>
30 <span class="js-hover-card" data-hover="{% url 'user_card' article.author.username %}">{{ article.author.get_username }}</span>
31 </a>
32 </li>

/home/nathan/rb/site/blog/templates/blog/includes/render_posts_preview.html

SELECT (width*height) AS "area",
       "ads_banner"."id",
       "ads_banner"."width",
       "ads_banner"."height",
       "ads_banner"."start_date",
       "ads_banner"."end_date",
       "ads_banner"."country_code",
       "ads_banner"."html"
  FROM
"ads_banner"
 WHERE
("ads_banner"."start_date" < '2026-01-22T06:23:05.797658+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-01-22T06:23:05.797872+00:00'::timestamptz OR "ads_banner"."end_date" IS NULL) AND "ads_banner"."height" <= 350 AND "ads_banner"."start_date" < '2026-01-22T06:23:05.797637+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" IS NULL OR "ads_banner"."end_date" > '2026-01-22T06:23:05.798150+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US')
SELECT ••• FROM "ads_banner" WHERE ("ads_banner"."start_date" < '2026-01-22T06:23:05.797658+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-01-22T06:23:05.797872+00:00'::timestamptz OR "ads_banner"."end_date" IS NULL) AND "ads_banner"."height" <= 350 AND "ads_banner"."start_date" < '2026-01-22T06:23:05.797637+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" IS NULL OR "ads_banner"."end_date" > '2026-01-22T06:23:05.798150+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US')
3 similar queries.
2.61

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./ads/templatetags/ads/drawing.py in render_banner(291)
  if not banners:

192 {% endcache %}
193
194 {# cant include banner in cache as it's region specific #}
195 {% render_banner 262 350 0 %}
196
197 {% cache cache_timeout 'set_sidebar_top_other_bit' user.is_authenticated set.id %}
198 {% if request.user.is_authenticated and not set.is_pending %}
199 {% if not set.is_figure %}

/home/nathan/rb/site/lego/templates/sets/includes/render_set_sidebar_top.html

SELECT (width*height) AS "area",
       "ads_banner"."id",
       "ads_banner"."width",
       "ads_banner"."height",
       "ads_banner"."start_date",
       "ads_banner"."end_date",
       "ads_banner"."country_code",
       "ads_banner"."html"
  FROM
"ads_banner"
 WHERE
("ads_banner"."start_date" < '2026-01-22T06:23:05.797658+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-01-22T06:23:05.797872+00:00'::timestamptz OR "ads_banner"."end_date" IS NULL) AND "ads_banner"."height" <= 350 AND "ads_banner"."start_date" < '2026-01-22T06:23:05.797637+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" IS NULL OR "ads_banner"."end_date" > '2026-01-22T06:23:05.798150+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US')
 ORDER BY
1 DESC, RANDOM() ASC
 LIMIT
1
SELECT ••• FROM "ads_banner" WHERE ("ads_banner"."start_date" < '2026-01-22T06:23:05.797658+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-01-22T06:23:05.797872+00:00'::timestamptz OR "ads_banner"."end_date" IS NULL) AND "ads_banner"."height" <= 350 AND "ads_banner"."start_date" < '2026-01-22T06:23:05.797637+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" IS NULL OR "ads_banner"."end_date" > '2026-01-22T06:23:05.798150+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US') ORDER BY 1 DESC, RANDOM() ASC LIMIT 1
3 similar queries.
1.97

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./ads/templatetags/ads/drawing.py in render_banner(298)
  banner = banners.order_by('-area', '?')[0]

192 {% endcache %}
193
194 {# cant include banner in cache as it's region specific #}
195 {% render_banner 262 350 0 %}
196
197 {% cache cache_timeout 'set_sidebar_top_other_bit' user.is_authenticated set.id %}
198 {% if request.user.is_authenticated and not set.is_pending %}
199 {% if not set.is_figure %}

/home/nathan/rb/site/lego/templates/sets/includes/render_set_sidebar_top.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "lego_set"."baseset_ptr_id",
       "lego_set"."start_date",
       "lego_set"."end_date"
  FROM
"lego_set"
 INNER JOIN
"lego_baseset"
    ON
("lego_set"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
"lego_set"."baseset_ptr_id" = 270817
 LIMIT
21
SELECT ••• FROM "lego_set" INNER JOIN "lego_baseset" ON ("lego_set"."baseset_ptr_id" = "lego_baseset"."id") WHERE "lego_set"."baseset_ptr_id" = 270817 LIMIT 21
4 similar queries. Duplicated 2 times.
0.20

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

267 <section class="padding-xxs">
268 <h4 class="text-center">External Sites</h4>
269 <table class="table">
270 <p>This {% if set.set %}Set{% else %}Minifig{% endif %} is known differently at other sites:</p>
271 {% for external_site, set_maps in mappings.items %}
272 <tr>
273 <td>{{ external_site }}</td>
274 <td>

/home/nathan/rb/site/lego/templates/sets/includes/render_set_sidebar_top.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined"
  FROM
"auth_user"
 WHERE
"auth_user"."id" = 17788
 LIMIT
21
SELECT ••• FROM "auth_user" WHERE "auth_user"."id" = 17788 LIMIT 21
3 similar queries.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

5 {% cache cache_timeout 'change_summary' user.is_authenticated set.id 'v3' %}
6 <div><small><i class="fa fa-fw fa-eye" title="Views"></i> {{ set.stats.hits|default:0|floor_100|intcomma }}</small></div>
7 <div><small><i class="fa fa-fw fa-plus" title="Added"></i> {{ changes.added.timestamp }}
8 {% if changes.added.user %}by
9 <a href="{% url 'user_profile' changes.added.user.get_username %}">{{ changes.added.user.get_username }}</a>
10 {% endif %}</small></div>
11 <div><small><i class="fa fa-fw fa-edit" title="Updated"></i> {{ changes.updated.timestamp }}
12 {% if changes.updated.user %}by

/home/nathan/rb/site/lego/templates/sets/includes/render_change_summary.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined"
  FROM
"auth_user"
 WHERE
"auth_user"."id" = 1
 LIMIT
21
SELECT ••• FROM "auth_user" WHERE "auth_user"."id" = 1 LIMIT 21
3 similar queries.
0.08

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

9 <a href="{% url 'user_profile' changes.added.user.get_username %}">{{ changes.added.user.get_username }}</a>
10 {% endif %}</small></div>
11 <div><small><i class="fa fa-fw fa-edit" title="Updated"></i> {{ changes.updated.timestamp }}
12 {% if changes.updated.user %}by
13 <a href="{% url 'user_profile' changes.updated.user.get_username %}">{{ changes.updated.user.get_username }}</a>
14 {% endif %}</small></div>
15 <div class="mb-10"><small><a href="{% url 'change_log' %}?search_id={{ set.set_num }}">See Change Log for {{ set.set_num }}</a></small></div>
16 {% if user.is_authenticated %}

/home/nathan/rb/site/lego/templates/sets/includes/render_change_summary.html

SELECT "django_content_type"."id",
       "django_content_type"."app_label",
       "django_content_type"."model"
  FROM
"django_content_type"
 WHERE
("django_content_type"."app_label" = 'lego' AND "django_content_type"."model" = 'set')
 LIMIT
21
SELECT ••• FROM "django_content_type" WHERE ("django_content_type"."app_label" = 'lego' AND "django_content_type"."model" = 'set') LIMIT 21
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./rb_comments/templatetags/rb_comments_filters.py in get_page_locked_status(78)
  content_type = ContentType.objects.get(app_label=page_content_type.split('.')[0], model=page_content_type.split('.')[1])

4 {% load rb_comments_filters %}
5
6 <div id="comments-{{ page.id }}">
7 {% get_page_locked_status content_type page.id as is_page_locked %}
8
9 {% comment %}
10 Not using render_comment_list as it uses styles in ul/li that I can't seem to get working well with Smarty.
11 Using fluent-comments to hide unused fields and do ajax add/reply comment.

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT 1 AS "a"
  FROM
"rb_comments_pagelocked"
 WHERE
("rb_comments_pagelocked"."content_type_id" = 63 AND "rb_comments_pagelocked"."object_id" = 270817)
 LIMIT
1
SELECT ••• FROM "rb_comments_pagelocked" WHERE ("rb_comments_pagelocked"."content_type_id" = 63 AND "rb_comments_pagelocked"."object_id" = 270817) LIMIT 1
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./rb_comments/templatetags/rb_comments_filters.py in get_page_locked_status(79)
  is_locked = PageLocked.objects.filter(content_type=content_type, object_id=page_id).exists()

4 {% load rb_comments_filters %}
5
6 <div id="comments-{{ page.id }}">
7 {% get_page_locked_status content_type page.id as is_page_locked %}
8
9 {% comment %}
10 Not using render_comment_list as it uses styles in ul/li that I can't seem to get working well with Smarty.
11 Using fluent-comments to hide unused fields and do ajax add/reply comment.

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT (SUBSTRING(tree_path, 1, 10)) AS "tree_path_root",
       "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity",
       "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "accounts_userplan"."user_id",
       "accounts_userplan"."plan_id",
       "accounts_userplan"."expiry_date",
       "accounts_userplan"."last_paid_date",
       "accounts_userplan"."is_subscription_active",
       "accounts_userplan"."subscription_period",
       "accounts_userplan"."payment_source",
       "accounts_userplan"."stripe_customer_id",
       "accounts_userplan"."stripe_subscription_id",
       "accounts_userplan"."paypal_subscription_id",
       "accounts_userplan"."base_free_plan_id",
       "accounts_userplan"."is_reminder_sent",
       "plans_plan"."id",
       "plans_plan"."type",
       "plans_plan"."version",
       "plans_plan"."stripe_id",
       "plans_plan"."paypal_id",
       "plans_plan"."cost_single",
       "plans_plan"."cost_monthly",
       "plans_plan"."cost_yearly",
       "accounts_userprofile"."user_id",
       "accounts_userprofile"."last_mod_inv",
       "accounts_userprofile"."last_activity",
       "accounts_userprofile"."last_ip",
       "accounts_userprofile"."last_country_id",
       "accounts_userprofile"."last_agent",
       "accounts_userprofile"."is_email_verified",
       "accounts_userprofile"."is_email_idle",
       "accounts_userprofile"."email_last_clicked",
       "accounts_userprofile"."api_token",
       "accounts_userprofile"."real_name",
       "accounts_userprofile"."location",
       "accounts_userprofile"."brickset_url",
       "accounts_userprofile"."mocpages_url",
       "accounts_userprofile"."flickr_url",
       "accounts_userprofile"."eurobricks_url",
       "accounts_userprofile"."youtube_url",
       "accounts_userprofile"."bricklink_url",
       "accounts_userprofile"."brickowl_url",
       "accounts_userprofile"."bricksafe_url",
       "accounts_userprofile"."website_url",
       "accounts_userprofile"."facebook_url",
       "accounts_userprofile"."twitter_url",
       "accounts_userprofile"."karma",
       "accounts_userprofile"."trophy_badge_id",
       "accounts_userprofile"."comments",
       "accounts_userprofile"."mfhash_vector",
       "accounts_userprofile"."is_muted",
       "accounts_userprofile"."is_banned",
       "accounts_userprofile"."is_suspected_pirate",
       "accounts_userprofile"."muted_until",
       "accounts_userprofile"."blocked_operations",
       "accounts_userprofile"."is_guest",
       "accounts_userprofile"."guest_token"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
  LEFT OUTER JOIN
"auth_user"
    ON
("django_comments"."user_id" = "auth_user"."id")
  LEFT OUTER JOIN
"accounts_userplan"
    ON
("auth_user"."id" = "accounts_userplan"."user_id")
  LEFT OUTER JOIN
"plans_plan"
    ON
("accounts_userplan"."plan_id" = "plans_plan"."id")
  LEFT OUTER JOIN
"accounts_userprofile"
    ON
("auth_user"."id" = "accounts_userprofile"."user_id")
 WHERE
("django_comments"."content_type_id" = 63 AND "django_comments"."object_pk" = '270817' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" AND NOT "django_comments"."is_removed")
 ORDER BY
1 DESC, "threadedcomments_comment"."tree_path" ASC
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") LEFT OUTER JOIN "auth_user" ON ("django_comments"."user_id" = "auth_user"."id") LEFT OUTER JOIN "accounts_userplan" ON ("auth_user"."id" = "accounts_userplan"."user_id") LEFT OUTER JOIN "plans_plan" ON ("accounts_userplan"."plan_id" = "plans_plan"."id") LEFT OUTER JOIN "accounts_userprofile" ON ("auth_user"."id" = "accounts_userprofile"."user_id") WHERE ("django_comments"."content_type_id" = 63 AND "django_comments"."object_pk" = '270817' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" AND NOT "django_comments"."is_removed") ORDER BY 1 DESC, "threadedcomments_comment"."tree_path" ASC
10.94

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/venv_rb310/lib/python3.10/site-packages/django_comments/templatetags/comments.py in render(71)
  qs = self.get_queryset(context)

/home/nathan/rb/site/./rb_comments/templatetags/rb_comments_filters.py in get_queryset(45)
  return qs[:50], len(qs)

14 {% endcomment %}
15 {% if not comment_list %}
16 {# Get comments for a page #}
17 {% get_rb_comment_list for page as comment_list %}
18 {% get_comment_count for page as num_comments %}
19
20 {% if show_comment_count %}
21 <div class="clearfix">

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT ("auth_user_groups"."user_id") AS "_prefetch_related_val_user_id",
       "auth_group"."id",
       "auth_group"."name"
  FROM
"auth_group"
 INNER JOIN
"auth_user_groups"
    ON
("auth_group"."id" = "auth_user_groups"."group_id")
 WHERE
"auth_user_groups"."user_id" IN (1192764, 1868633, 958934, 1845760, 1778760, 733164, 1042545, 1177910, 1648415, 719745, 818929, 1105412, 1921171, 457574, 28679, 1834587, 1152220, 665704, 197632, 1209842, 1031452, 1078362, 1718016, 399904, 1211344, 1136034, 1731406, 537774, 1163248, 528303, 1097057, 657890, 968244, 1126694, 1196144, 1003981, 518890, 1188623, 1161743, 1271274, 1301983, 1420755, 824571, 1073861, 116216, 1135952, 1123639, 1409978)
SELECT ••• FROM "auth_group" INNER JOIN "auth_user_groups" ON ("auth_group"."id" = "auth_user_groups"."group_id") WHERE "auth_user_groups"."user_id" IN (1192764, 1868633, 958934, 1845760, 1778760, 733164, 1042545, 1177910, 1648415, 719745, 818929, 1105412, 1921171, 457574, 28679, 1834587, 1152220, 665704, 197632, 1209842, 1031452, 1078362, 1718016, 399904, 1211344, 1136034, 1731406, 537774, 1163248, 528303, 1097057, 657890, 968244, 1126694, 1196144, 1003981, 518890, 1188623, 1161743, 1271274, 1301983, 1420755, 824571, 1073861, 116216, 1135952, 1123639, 1409978)
0.29

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/venv_rb310/lib/python3.10/site-packages/django_comments/templatetags/comments.py in render(71)
  qs = self.get_queryset(context)

/home/nathan/rb/site/./rb_comments/templatetags/rb_comments_filters.py in get_queryset(45)
  return qs[:50], len(qs)

14 {% endcomment %}
15 {% if not comment_list %}
16 {# Get comments for a page #}
17 {% get_rb_comment_list for page as comment_list %}
18 {% get_comment_count for page as num_comments %}
19
20 {% if show_comment_count %}
21 <div class="clearfix">

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT COUNT(*) AS "__count"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
("django_comments"."content_type_id" = 63 AND "django_comments"."object_pk" = '270817' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" AND NOT "django_comments"."is_removed")
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE ("django_comments"."content_type_id" = 63 AND "django_comments"."object_pk" = '270817' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" AND NOT "django_comments"."is_removed")
0.66

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/venv_rb310/lib/python3.10/site-packages/django_comments/templatetags/comments.py in render(72)
  context[self.as_varname] = self.get_context_value_from_queryset(context, qs)

/home/nathan/venv_rb310/lib/python3.10/site-packages/threadedcomments/templatetags/threadedcomments_tags.py in get_context_value_from_queryset(116)
  return qs.count()

15 {% if not comment_list %}
16 {# Get comments for a page #}
17 {% get_rb_comment_list for page as comment_list %}
18 {% get_comment_count for page as num_comments %}
19
20 {% if show_comment_count %}
21 <div class="clearfix">
22 <div class="heading-title heading-border-bottom heading-color">

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT (SUBSTRING(tree_path, 1, 10)) AS "tree_path_root",
       "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity",
       "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "accounts_userplan"."user_id",
       "accounts_userplan"."plan_id",
       "accounts_userplan"."expiry_date",
       "accounts_userplan"."last_paid_date",
       "accounts_userplan"."is_subscription_active",
       "accounts_userplan"."subscription_period",
       "accounts_userplan"."payment_source",
       "accounts_userplan"."stripe_customer_id",
       "accounts_userplan"."stripe_subscription_id",
       "accounts_userplan"."paypal_subscription_id",
       "accounts_userplan"."base_free_plan_id",
       "accounts_userplan"."is_reminder_sent",
       "plans_plan"."id",
       "plans_plan"."type",
       "plans_plan"."version",
       "plans_plan"."stripe_id",
       "plans_plan"."paypal_id",
       "plans_plan"."cost_single",
       "plans_plan"."cost_monthly",
       "plans_plan"."cost_yearly",
       "accounts_userprofile"."user_id",
       "accounts_userprofile"."last_mod_inv",
       "accounts_userprofile"."last_activity",
       "accounts_userprofile"."last_ip",
       "accounts_userprofile"."last_country_id",
       "accounts_userprofile"."last_agent",
       "accounts_userprofile"."is_email_verified",
       "accounts_userprofile"."is_email_idle",
       "accounts_userprofile"."email_last_clicked",
       "accounts_userprofile"."api_token",
       "accounts_userprofile"."real_name",
       "accounts_userprofile"."location",
       "accounts_userprofile"."brickset_url",
       "accounts_userprofile"."mocpages_url",
       "accounts_userprofile"."flickr_url",
       "accounts_userprofile"."eurobricks_url",
       "accounts_userprofile"."youtube_url",
       "accounts_userprofile"."bricklink_url",
       "accounts_userprofile"."brickowl_url",
       "accounts_userprofile"."bricksafe_url",
       "accounts_userprofile"."website_url",
       "accounts_userprofile"."facebook_url",
       "accounts_userprofile"."twitter_url",
       "accounts_userprofile"."karma",
       "accounts_userprofile"."trophy_badge_id",
       "accounts_userprofile"."comments",
       "accounts_userprofile"."mfhash_vector",
       "accounts_userprofile"."is_muted",
       "accounts_userprofile"."is_banned",
       "accounts_userprofile"."is_suspected_pirate",
       "accounts_userprofile"."muted_until",
       "accounts_userprofile"."blocked_operations",
       "accounts_userprofile"."is_guest",
       "accounts_userprofile"."guest_token"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
  LEFT OUTER JOIN
"auth_user"
    ON
("django_comments"."user_id" = "auth_user"."id")
  LEFT OUTER JOIN
"accounts_userplan"
    ON
("auth_user"."id" = "accounts_userplan"."user_id")
  LEFT OUTER JOIN
"plans_plan"
    ON
("accounts_userplan"."plan_id" = "plans_plan"."id")
  LEFT OUTER JOIN
"accounts_userprofile"
    ON
("auth_user"."id" = "accounts_userprofile"."user_id")
 WHERE
("django_comments"."content_type_id" = 63 AND "django_comments"."object_pk" = '270817' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" AND NOT "django_comments"."is_removed")
 ORDER BY
1 DESC, "threadedcomments_comment"."tree_path" ASC
 LIMIT
50
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") LEFT OUTER JOIN "auth_user" ON ("django_comments"."user_id" = "auth_user"."id") LEFT OUTER JOIN "accounts_userplan" ON ("auth_user"."id" = "accounts_userplan"."user_id") LEFT OUTER JOIN "plans_plan" ON ("accounts_userplan"."plan_id" = "plans_plan"."id") LEFT OUTER JOIN "accounts_userprofile" ON ("auth_user"."id" = "accounts_userprofile"."user_id") WHERE ("django_comments"."content_type_id" = 63 AND "django_comments"."object_pk" = '270817' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" AND NOT "django_comments"."is_removed") ORDER BY 1 DESC, "threadedcomments_comment"."tree_path" ASC LIMIT 50
2.42

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

89 {% with cache_timeout=user.is_authenticated|yesno:"0,300" %}
90 {% cache cache_timeout 'comments_list_v2' request.user.is_authenticated page.id request.GET.page request.GET.showmore num_comments %}
91
92 <div class="comments {% if not comment_list.0 %} empty{% endif %} mb-30">
93 {% if use_context %}
94 {# Flat list of comments #}
95 {% for comment in comment_list.0|make_proxy_users %}
96 <ul class="comment list-unstyled comment-list-wrapper">

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT ("auth_user_groups"."user_id") AS "_prefetch_related_val_user_id",
       "auth_group"."id",
       "auth_group"."name"
  FROM
"auth_group"
 INNER JOIN
"auth_user_groups"
    ON
("auth_group"."id" = "auth_user_groups"."group_id")
 WHERE
"auth_user_groups"."user_id" IN (1192764, 1868633, 958934, 1845760, 1778760, 733164, 1042545, 1177910, 1648415, 719745, 818929, 1105412, 1921171, 457574, 28679, 1834587, 1152220, 665704, 197632, 1209842, 1031452, 1078362, 1718016, 399904, 1211344, 1136034, 1731406, 537774, 1163248, 528303, 1097057, 657890)
SELECT ••• FROM "auth_group" INNER JOIN "auth_user_groups" ON ("auth_group"."id" = "auth_user_groups"."group_id") WHERE "auth_user_groups"."user_id" IN (1192764, 1868633, 958934, 1845760, 1778760, 733164, 1042545, 1177910, 1648415, 719745, 818929, 1105412, 1921171, 457574, 28679, 1834587, 1152220, 665704, 197632, 1209842, 1031452, 1078362, 1718016, 399904, 1211344, 1136034, 1731406, 537774, 1163248, 528303, 1097057, 657890)
0.20

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

89 {% with cache_timeout=user.is_authenticated|yesno:"0,300" %}
90 {% cache cache_timeout 'comments_list_v2' request.user.is_authenticated page.id request.GET.page request.GET.showmore num_comments %}
91
92 <div class="comments {% if not comment_list.0 %} empty{% endif %} mb-30">
93 {% if use_context %}
94 {# Flat list of comments #}
95 {% for comment in comment_list.0|make_proxy_users %}
96 <ul class="comment list-unstyled comment-list-wrapper">

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1192764
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1192764 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries.
0.14

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1192764
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1192764 LIMIT 21
60 similar queries.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1868633
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1868633 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 2 times.
0.18

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1868633
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1868633 LIMIT 21
60 similar queries. Duplicated 2 times.
0.16

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 1093413
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 1093413 LIMIT 21
34 similar queries. Duplicated 3 times.
0.27

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 958934
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 958934 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 958934
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 958934 LIMIT 21
60 similar queries.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 1093413
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 1093413 LIMIT 21
34 similar queries. Duplicated 3 times.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1845760
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1845760 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries.
0.22

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1845760
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1845760 LIMIT 21
60 similar queries.
0.19

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 1093413
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 1093413 LIMIT 21
34 similar queries. Duplicated 3 times.
0.36

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1868633
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1868633 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 2 times.
0.14

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1868633
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1868633 LIMIT 21
60 similar queries. Duplicated 2 times.
0.22

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1778760
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1778760 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1778760
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1778760 LIMIT 21
60 similar queries.
0.19

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1778760)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1778760) LIMIT 1
56 similar queries. Duplicated 2 times.
0.31

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1778760)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1778760) LIMIT 1
56 similar queries. Duplicated 2 times.
0.27

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 1069766
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 1069766 LIMIT 21
34 similar queries.
0.31

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 733164
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 733164 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 733164
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 733164 LIMIT 21
60 similar queries.
0.14

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1042545
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1042545 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1042545
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1042545 LIMIT 21
60 similar queries.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 1037864
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 1037864 LIMIT 21
34 similar queries. Duplicated 2 times.
0.23

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1177910
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1177910 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1177910
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1177910 LIMIT 21
60 similar queries.
0.17

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1177910)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1177910) LIMIT 1
56 similar queries. Duplicated 2 times.
5.59

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1177910)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1177910) LIMIT 1
56 similar queries. Duplicated 2 times.
0.35

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 1038311
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 1038311 LIMIT 21
34 similar queries.
0.34

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1648415
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1648415 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 2 times.
0.25

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1648415
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1648415 LIMIT 21
60 similar queries. Duplicated 2 times.
0.20

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 1037864
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 1037864 LIMIT 21
34 similar queries. Duplicated 2 times.
0.18

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 719745
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 719745 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 719745
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 719745 LIMIT 21
60 similar queries.
0.14

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 719745)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 719745) LIMIT 1
56 similar queries. Duplicated 2 times.
0.21

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 719745)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 719745) LIMIT 1
56 similar queries. Duplicated 2 times.
0.22

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 818929
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 818929 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 818929
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 818929 LIMIT 21
60 similar queries.
0.20

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 818929)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 818929) LIMIT 1
56 similar queries. Duplicated 2 times.
0.22

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 818929)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 818929) LIMIT 1
56 similar queries. Duplicated 2 times.
0.17

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 1036352
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 1036352 LIMIT 21
34 similar queries. Duplicated 2 times.
0.18

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1105412
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1105412 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 2 times.
0.09

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1105412
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1105412 LIMIT 21
60 similar queries. Duplicated 2 times.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 1052803
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 1052803 LIMIT 21
34 similar queries.
0.21

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1648415
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1648415 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 2 times.
0.08

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1648415
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1648415 LIMIT 21
60 similar queries. Duplicated 2 times.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 1056881
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 1056881 LIMIT 21
34 similar queries.
0.19

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1105412
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1105412 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 2 times.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1105412
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1105412 LIMIT 21
60 similar queries. Duplicated 2 times.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 1036352
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 1036352 LIMIT 21
34 similar queries. Duplicated 2 times.
0.16

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1921171
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1921171 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 2 times.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1921171
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1921171 LIMIT 21
60 similar queries. Duplicated 2 times.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1921171)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1921171) LIMIT 1
56 similar queries. Duplicated 4 times.
0.20

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1921171)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1921171) LIMIT 1
56 similar queries. Duplicated 4 times.
0.17

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 457574
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 457574 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 3 times.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 457574
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 457574 LIMIT 21
60 similar queries. Duplicated 3 times.
0.18

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 457574)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 457574) LIMIT 1
56 similar queries. Duplicated 6 times.
0.27

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 457574)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 457574) LIMIT 1
56 similar queries. Duplicated 6 times.
0.21

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 1018972
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 1018972 LIMIT 21
34 similar queries.
0.26

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 28679
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 28679 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 3 times.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 28679
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 28679 LIMIT 21
60 similar queries. Duplicated 3 times.
0.14

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 28679)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 28679) LIMIT 1
56 similar queries. Duplicated 6 times.
0.18

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 28679)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 28679) LIMIT 1
56 similar queries. Duplicated 6 times.
0.16

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 28679)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 28679) LIMIT 21
41 similar queries. Duplicated 3 times.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}
65 {% endif %}
66 {% endif %}
67 {% if page.is_moc %}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 457574
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 457574 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 3 times.
0.09

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 457574
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 457574 LIMIT 21
60 similar queries. Duplicated 3 times.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 457574)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 457574) LIMIT 1
56 similar queries. Duplicated 6 times.
0.16

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 457574)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 457574) LIMIT 1
56 similar queries. Duplicated 6 times.
0.22

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 1018967
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 1018967 LIMIT 21
34 similar queries.
0.21

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1834587
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1834587 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1834587
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1834587 LIMIT 21
60 similar queries.
0.16

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 1060246
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 1060246 LIMIT 21
34 similar queries.
0.24

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 457574
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 457574 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 3 times.
0.09

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 457574
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 457574 LIMIT 21
60 similar queries. Duplicated 3 times.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 457574)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 457574) LIMIT 1
56 similar queries. Duplicated 6 times.
0.17

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 457574)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 457574) LIMIT 1
56 similar queries. Duplicated 6 times.
0.16

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1152220
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1152220 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1152220
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1152220 LIMIT 21
60 similar queries.
0.16

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 665704
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 665704 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 3 times.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 665704
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 665704 LIMIT 21
60 similar queries. Duplicated 3 times.
0.17

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 665704)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 665704) LIMIT 1
56 similar queries. Duplicated 6 times.
0.22

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 665704)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 665704) LIMIT 1
56 similar queries. Duplicated 6 times.
0.19

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 665704)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 665704) LIMIT 21
41 similar queries. Duplicated 4 times.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}
65 {% endif %}
66 {% endif %}
67 {% if page.is_moc %}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 989368
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 989368 LIMIT 21
34 similar queries.
0.14

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 197632
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 197632 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 2 times.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 197632
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 197632 LIMIT 21
60 similar queries. Duplicated 2 times.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 197632)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 197632) LIMIT 1
56 similar queries. Duplicated 4 times.
0.20

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 197632)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 197632) LIMIT 1
56 similar queries. Duplicated 4 times.
0.29

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 197632)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 197632) LIMIT 21
41 similar queries. Duplicated 4 times.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}
65 {% endif %}
66 {% endif %}
67 {% if page.is_moc %}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 1000022
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 1000022 LIMIT 21
34 similar queries. Duplicated 2 times.
0.22

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 665704
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 665704 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 3 times.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 665704
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 665704 LIMIT 21
60 similar queries. Duplicated 3 times.
0.14

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 665704)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 665704) LIMIT 1
56 similar queries. Duplicated 6 times.
0.24

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 665704)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 665704) LIMIT 1
56 similar queries. Duplicated 6 times.
0.20

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 665704)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 665704) LIMIT 21
41 similar queries. Duplicated 4 times.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}
65 {% endif %}
66 {% endif %}
67 {% if page.is_moc %}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 1000022
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 1000022 LIMIT 21
34 similar queries. Duplicated 2 times.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1209842
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1209842 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1209842
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1209842 LIMIT 21
60 similar queries.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 1009340
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 1009340 LIMIT 21
34 similar queries.
0.19

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 197632
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 197632 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 2 times.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 197632
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 197632 LIMIT 21
60 similar queries. Duplicated 2 times.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 197632)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 197632) LIMIT 1
56 similar queries. Duplicated 4 times.
0.25

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 197632)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 197632) LIMIT 1
56 similar queries. Duplicated 4 times.
0.23

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 197632)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 197632) LIMIT 21
41 similar queries. Duplicated 4 times.
0.14

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}
65 {% endif %}
66 {% endif %}
67 {% if page.is_moc %}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 1018709
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 1018709 LIMIT 21
34 similar queries.
0.25

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1031452
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1031452 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 3 times.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1031452
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1031452 LIMIT 21
60 similar queries. Duplicated 3 times.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1031452)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1031452) LIMIT 1
56 similar queries. Duplicated 6 times.
0.70

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1031452)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1031452) LIMIT 1
56 similar queries. Duplicated 6 times.
0.28

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1078362
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1078362 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 2 times.
0.14

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1078362
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1078362 LIMIT 21
60 similar queries. Duplicated 2 times.
0.16

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 985416
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 985416 LIMIT 21
34 similar queries.
0.25

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1031452
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1031452 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 3 times.
0.09

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1031452
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1031452 LIMIT 21
60 similar queries. Duplicated 3 times.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1031452)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1031452) LIMIT 1
56 similar queries. Duplicated 6 times.
0.19

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1031452)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1031452) LIMIT 1
56 similar queries. Duplicated 6 times.
0.23

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 1042569
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 1042569 LIMIT 21
34 similar queries.
0.32

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1078362
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1078362 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 2 times.
0.24

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1078362
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1078362 LIMIT 21
60 similar queries. Duplicated 2 times.
0.23

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 1057615
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 1057615 LIMIT 21
34 similar queries.
0.23

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1921171
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1921171 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 2 times.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1921171
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1921171 LIMIT 21
60 similar queries. Duplicated 2 times.
0.14

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1921171)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1921171) LIMIT 1
56 similar queries. Duplicated 4 times.
0.24

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1921171)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1921171) LIMIT 1
56 similar queries. Duplicated 4 times.
0.21

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1718016
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1718016 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries.
0.18

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1718016
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1718016 LIMIT 21
60 similar queries.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 985414
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 985414 LIMIT 21
34 similar queries.
0.18

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 399904
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 399904 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 2 times.
0.22

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 399904
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 399904 LIMIT 21
60 similar queries. Duplicated 2 times.
0.14

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 399904)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 399904) LIMIT 1
56 similar queries. Duplicated 4 times.
0.24

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 399904)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 399904) LIMIT 1
56 similar queries. Duplicated 4 times.
0.17

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1211344
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1211344 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 2 times.
0.14

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1211344
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1211344 LIMIT 21
60 similar queries. Duplicated 2 times.
0.16

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1211344)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1211344) LIMIT 1
56 similar queries. Duplicated 4 times.
0.20

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1211344)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1211344) LIMIT 1
56 similar queries. Duplicated 4 times.
0.19

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 976059
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 976059 LIMIT 21
34 similar queries.
0.25

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 399904
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 399904 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 2 times.
0.09

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 399904
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 399904 LIMIT 21
60 similar queries. Duplicated 2 times.
0.14

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 399904)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 399904) LIMIT 1
56 similar queries. Duplicated 4 times.
0.17

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 399904)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 399904) LIMIT 1
56 similar queries. Duplicated 4 times.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 1027172
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 1027172 LIMIT 21
34 similar queries.
0.28

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1211344
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1211344 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 2 times.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1211344
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1211344 LIMIT 21
60 similar queries. Duplicated 2 times.
0.22

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1211344)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1211344) LIMIT 1
56 similar queries. Duplicated 4 times.
0.20

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1211344)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1211344) LIMIT 1
56 similar queries. Duplicated 4 times.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1136034
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1136034 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 3 times.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1136034
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1136034 LIMIT 21
60 similar queries. Duplicated 3 times.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 967704
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 967704 LIMIT 21
34 similar queries. Duplicated 2 times.
0.23

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 28679
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 28679 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 3 times.
0.09

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 28679
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 28679 LIMIT 21
60 similar queries. Duplicated 3 times.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 28679)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 28679) LIMIT 1
56 similar queries. Duplicated 6 times.
0.17

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 28679)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 28679) LIMIT 1
56 similar queries. Duplicated 6 times.
0.14

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 28679)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 28679) LIMIT 21
41 similar queries. Duplicated 3 times.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}
65 {% endif %}
66 {% endif %}
67 {% if page.is_moc %}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 983069
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 983069 LIMIT 21
34 similar queries.
0.91

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1136034
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1136034 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 3 times.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1136034
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1136034 LIMIT 21
60 similar queries. Duplicated 3 times.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 986073
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 986073 LIMIT 21
34 similar queries.
0.25

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 28679
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 28679 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 3 times.
0.09

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 28679
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 28679 LIMIT 21
60 similar queries. Duplicated 3 times.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 28679)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 28679) LIMIT 1
56 similar queries. Duplicated 6 times.
0.18

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 28679)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 28679) LIMIT 1
56 similar queries. Duplicated 6 times.
0.19

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 28679)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 28679) LIMIT 21
41 similar queries. Duplicated 3 times.
0.26

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}
65 {% endif %}
66 {% endif %}
67 {% if page.is_moc %}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 967704
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 967704 LIMIT 21
34 similar queries. Duplicated 2 times.
0.34

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1731406
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1731406 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries.
0.16

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1731406
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1731406 LIMIT 21
60 similar queries.
0.16

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1731406)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1731406) LIMIT 1
56 similar queries. Duplicated 2 times.
0.25

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1731406)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1731406) LIMIT 1
56 similar queries. Duplicated 2 times.
0.24

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 986830
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 986830 LIMIT 21
34 similar queries.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 665704
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 665704 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 3 times.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 665704
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 665704 LIMIT 21
60 similar queries. Duplicated 3 times.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 665704)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 665704) LIMIT 1
56 similar queries. Duplicated 6 times.
0.21

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 665704)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 665704) LIMIT 1
56 similar queries. Duplicated 6 times.
0.25

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 665704)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 665704) LIMIT 21
41 similar queries. Duplicated 4 times.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}
65 {% endif %}
66 {% endif %}
67 {% if page.is_moc %}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 537774
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 537774 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 537774
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 537774 LIMIT 21
60 similar queries.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 537774)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 537774) LIMIT 1
56 similar queries. Duplicated 2 times.
0.18

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 537774)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 537774) LIMIT 1
56 similar queries. Duplicated 2 times.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 954409
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 954409 LIMIT 21
34 similar queries.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1136034
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1136034 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 3 times.
0.09

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1136034
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1136034 LIMIT 21
60 similar queries. Duplicated 3 times.
0.14

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 986062
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 986062 LIMIT 21
34 similar queries.
0.16

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1031452
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1031452 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries. Duplicated 3 times.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1031452
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1031452 LIMIT 21
60 similar queries. Duplicated 3 times.
0.16

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1031452)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1031452) LIMIT 1
56 similar queries. Duplicated 6 times.
0.21

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1031452)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 1031452) LIMIT 1
56 similar queries. Duplicated 6 times.
0.19

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1163248
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1163248 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1163248
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1163248 LIMIT 21
60 similar queries.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 954390
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 954390 LIMIT 21
34 similar queries.
0.18

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 528303
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 528303 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 528303
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 528303 LIMIT 21
60 similar queries.
0.18

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 528303)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 528303) LIMIT 1
56 similar queries. Duplicated 2 times.
0.31

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 528303)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 528303) LIMIT 1
56 similar queries. Duplicated 2 times.
0.24

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 1097057
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 1097057 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1097057
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1097057 LIMIT 21
60 similar queries.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "django_comments"."id",
       "django_comments"."content_type_id",
       "django_comments"."object_pk",
       "django_comments"."site_id",
       "django_comments"."user_id",
       "django_comments"."user_name",
       "django_comments"."user_email",
       "django_comments"."user_url",
       "django_comments"."comment",
       "django_comments"."submit_date",
       "django_comments"."ip_address",
       "django_comments"."is_public",
       "django_comments"."is_removed",
       "threadedcomments_comment"."comment_ptr_id",
       "threadedcomments_comment"."title",
       "threadedcomments_comment"."parent_id",
       "threadedcomments_comment"."last_child_id",
       "threadedcomments_comment"."tree_path",
       "threadedcomments_comment"."newest_activity"
  FROM
"threadedcomments_comment"
 INNER JOIN
"django_comments"
    ON
("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id")
 WHERE
"threadedcomments_comment"."comment_ptr_id" = 954120
 LIMIT
21
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE "threadedcomments_comment"."comment_ptr_id" = 954120 LIMIT 21
34 similar queries.
0.83

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

105 {% if not comment.open and not comment.close %}</li>{% endif %}
106 {% if comment.open %}
107 <ul class="comment list-unstyled comment-list-wrapper">{% endif %}
108 <li class="comment {% if comment.parent and comment.depth < 7 %}comment-reply{% endif %} comment-wrapper">
109 {% include "comments/comment.html" %}
110 {% for close in comment.close %}
111 </li>
112 </ul>

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.html

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 657890
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 657890 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
50 similar queries.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./avatar/templatetags/avatar_tags.py in avatar_url(33)
  avatar_url = provider.get_avatar_url(user, size)

/home/nathan/rb/site/./avatar/providers.py in get_avatar_url(48)
  avatar = get_primary_avatar(user, size)

/home/nathan/rb/site/./avatar/utils.py in get_primary_avatar(120)
  avatar = user.avatar_set.order_by("-primary", "-date_uploaded")[0]

36 {% if is_blocked %}
37 <img data-src="{% static settings.AVATAR_DEFAULT_URL %}" class="comment-avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="comment-avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="text-center pointer pt-10 js-collapse-comments" data-comment-id="{{ comment.id }}">
43 <i class="fa fa-minus-square-o fa-lg"></i>

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 657890
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 657890 LIMIT 21
60 similar queries.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 657890)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 657890) LIMIT 1
56 similar queries. Duplicated 2 times.
0.20

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT 1 AS "a"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 657890)
 LIMIT
1
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."designer_id" = 657890) LIMIT 1
56 similar queries. Duplicated 2 times.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_rolename(618)
  elif hasattr(self, 'designer') and Moc.objects.filter(designer=self.designer).exists():

57 {% elif page.is_moc and page.designer_id == comment.user_id %}
58 <span class="label label-dark-blue" title="This user designed this MOC">Designed this MOC</span>
59 {% else %}
60 <span class="label label-info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
61 {% endif %}
62 {% if not comment.user.plan.is_free %}
63 {% if comment.user.is_public_plan %}
64 {{ comment.user.get_plan_html }}

/home/nathan/rb/site/rb_comments/templates/comments/comment.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "lego_subset"."baseset_ptr_id",
       "lego_subset"."parent_set_id",
       "lego_theme"."id",
       "lego_theme"."parent_id",
       "lego_theme"."name",
       "lego_theme"."slug",
       "lego_theme"."set_count",
       "lego_theme"."t1_id",
       "lego_theme"."t1_name",
       "lego_theme"."t2_name",
       "lego_theme"."t3_name",
       "lego_theme"."lego_blurb",
       "lego_theme"."banner_img",
       "lego_theme"."descr",
       T5."id",
       T5."parent_id",
       T5."name",
       T5."slug",
       T5."set_count",
       T5."t1_id",
       T5."t1_name",
       T5."t2_name",
       T5."t3_name",
       T5."lego_blurb",
       T5."banner_img",
       T5."descr",
       T6."id",
       T6."parent_id",
       T6."name",
       T6."slug",
       T6."set_count",
       T6."t1_id",
       T6."t1_name",
       T6."t2_name",
       T6."t3_name",
       T6."lego_blurb",
       T6."banner_img",
       T6."descr",
       "lego_setstatstotal"."set_id",
       "lego_setstatstotal"."hits",
       "lego_setstatstotal"."builds",
       "lego_setstatstotal"."likes",
       "lego_setstatstotal"."bi_downloads",
       "lego_setstatstotal"."featured_hits",
       "lego_setstatstotal"."user_hits"
  FROM
"lego_subset"
 INNER JOIN
"lego_baseset"
    ON
("lego_subset"."baseset_ptr_id" = "lego_baseset"."id")
 INNER JOIN
"lego_theme"
    ON
("lego_baseset"."theme_id" = "lego_theme"."id")
  LEFT OUTER JOIN
"lego_theme" T5
    ON
("lego_theme"."parent_id" = T5."id")
  LEFT OUTER JOIN
"lego_theme" T6
    ON
(T5."parent_id" = T6."id")
  LEFT OUTER JOIN
"lego_setstatstotal"
    ON
("lego_baseset"."id" = "lego_setstatstotal"."set_id")
 WHERE
("lego_baseset"."is_active" AND "lego_subset"."parent_set_id" = 270817)
SELECT ••• FROM "lego_subset" INNER JOIN "lego_baseset" ON ("lego_subset"."baseset_ptr_id" = "lego_baseset"."id") INNER JOIN "lego_theme" ON ("lego_baseset"."theme_id" = "lego_theme"."id") LEFT OUTER JOIN "lego_theme" T5 ON ("lego_theme"."parent_id" = T5."id") LEFT OUTER JOIN "lego_theme" T6 ON (T5."parent_id" = T6."id") LEFT OUTER JOIN "lego_setstatstotal" ON ("lego_baseset"."id" = "lego_setstatstotal"."set_id") WHERE ("lego_baseset"."is_active" AND "lego_subset"."parent_set_id" = 270817)
2 similar queries. Duplicated 2 times.
1.08

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1814)
  alt_build = self.get_alternate_builds(include_subsets=True)

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds(1413)
  sets = [self] + list(subsets)

85 <div class="tab-pane in" id="tab_alt_builds">
86 <div id="alt_builds_list">
87 {% if is_crawler %}
88 {% get_alternate_builds_tab_html set %}
89 {% endif %}
90 </div>
91 </div>
92 {% endif %}

/home/nathan/rb/site/lego/templates/sets/includes/render_set_main_tabs.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "lego_bmodel"."baseset_ptr_id",
       "lego_bmodel"."parent_set_id",
       "lego_theme"."id",
       "lego_theme"."parent_id",
       "lego_theme"."name",
       "lego_theme"."slug",
       "lego_theme"."set_count",
       "lego_theme"."t1_id",
       "lego_theme"."t1_name",
       "lego_theme"."t2_name",
       "lego_theme"."t3_name",
       "lego_theme"."lego_blurb",
       "lego_theme"."banner_img",
       "lego_theme"."descr",
       T5."id",
       T5."parent_id",
       T5."name",
       T5."slug",
       T5."set_count",
       T5."t1_id",
       T5."t1_name",
       T5."t2_name",
       T5."t3_name",
       T5."lego_blurb",
       T5."banner_img",
       T5."descr",
       T6."id",
       T6."parent_id",
       T6."name",
       T6."slug",
       T6."set_count",
       T6."t1_id",
       T6."t1_name",
       T6."t2_name",
       T6."t3_name",
       T6."lego_blurb",
       T6."banner_img",
       T6."descr",
       "lego_setstatstotal"."set_id",
       "lego_setstatstotal"."hits",
       "lego_setstatstotal"."builds",
       "lego_setstatstotal"."likes",
       "lego_setstatstotal"."bi_downloads",
       "lego_setstatstotal"."featured_hits",
       "lego_setstatstotal"."user_hits"
  FROM
"lego_bmodel"
 INNER JOIN
"lego_baseset"
    ON
("lego_bmodel"."baseset_ptr_id" = "lego_baseset"."id")
 INNER JOIN
"lego_theme"
    ON
("lego_baseset"."theme_id" = "lego_theme"."id")
  LEFT OUTER JOIN
"lego_theme" T5
    ON
("lego_theme"."parent_id" = T5."id")
  LEFT OUTER JOIN
"lego_theme" T6
    ON
(T5."parent_id" = T6."id")
  LEFT OUTER JOIN
"lego_setstatstotal"
    ON
("lego_baseset"."id" = "lego_setstatstotal"."set_id")
 WHERE
("lego_baseset"."is_active" AND "lego_bmodel"."parent_set_id" = 270817)
SELECT ••• FROM "lego_bmodel" INNER JOIN "lego_baseset" ON ("lego_bmodel"."baseset_ptr_id" = "lego_baseset"."id") INNER JOIN "lego_theme" ON ("lego_baseset"."theme_id" = "lego_theme"."id") LEFT OUTER JOIN "lego_theme" T5 ON ("lego_theme"."parent_id" = T5."id") LEFT OUTER JOIN "lego_theme" T6 ON (T5."parent_id" = T6."id") LEFT OUTER JOIN "lego_setstatstotal" ON ("lego_baseset"."id" = "lego_setstatstotal"."set_id") WHERE ("lego_baseset"."is_active" AND "lego_bmodel"."parent_set_id" = 270817)
0.95

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1817)
  b_models = self.get_b_models()

/home/nathan/rb/site/./lego/models/sets.py in get_b_models(1454)
  sets = sorted(sets, key=lambda x: x.set_num_sorted)

85 <div class="tab-pane in" id="tab_alt_builds">
86 <div id="alt_builds_list">
87 {% if is_crawler %}
88 {% get_alternate_builds_tab_html set %}
89 {% endif %}
90 </div>
91 </div>
92 {% endif %}

/home/nathan/rb/site/lego/templates/sets/includes/render_set_main_tabs.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "lego_subset"."baseset_ptr_id",
       "lego_subset"."parent_set_id",
       "lego_theme"."id",
       "lego_theme"."parent_id",
       "lego_theme"."name",
       "lego_theme"."slug",
       "lego_theme"."set_count",
       "lego_theme"."t1_id",
       "lego_theme"."t1_name",
       "lego_theme"."t2_name",
       "lego_theme"."t3_name",
       "lego_theme"."lego_blurb",
       "lego_theme"."banner_img",
       "lego_theme"."descr",
       T5."id",
       T5."parent_id",
       T5."name",
       T5."slug",
       T5."set_count",
       T5."t1_id",
       T5."t1_name",
       T5."t2_name",
       T5."t3_name",
       T5."lego_blurb",
       T5."banner_img",
       T5."descr",
       T6."id",
       T6."parent_id",
       T6."name",
       T6."slug",
       T6."set_count",
       T6."t1_id",
       T6."t1_name",
       T6."t2_name",
       T6."t3_name",
       T6."lego_blurb",
       T6."banner_img",
       T6."descr",
       "lego_setstatstotal"."set_id",
       "lego_setstatstotal"."hits",
       "lego_setstatstotal"."builds",
       "lego_setstatstotal"."likes",
       "lego_setstatstotal"."bi_downloads",
       "lego_setstatstotal"."featured_hits",
       "lego_setstatstotal"."user_hits"
  FROM
"lego_subset"
 INNER JOIN
"lego_baseset"
    ON
("lego_subset"."baseset_ptr_id" = "lego_baseset"."id")
 INNER JOIN
"lego_theme"
    ON
("lego_baseset"."theme_id" = "lego_theme"."id")
  LEFT OUTER JOIN
"lego_theme" T5
    ON
("lego_theme"."parent_id" = T5."id")
  LEFT OUTER JOIN
"lego_theme" T6
    ON
(T5."parent_id" = T6."id")
  LEFT OUTER JOIN
"lego_setstatstotal"
    ON
("lego_baseset"."id" = "lego_setstatstotal"."set_id")
 WHERE
("lego_baseset"."is_active" AND "lego_subset"."parent_set_id" = 270817)
SELECT ••• FROM "lego_subset" INNER JOIN "lego_baseset" ON ("lego_subset"."baseset_ptr_id" = "lego_baseset"."id") INNER JOIN "lego_theme" ON ("lego_baseset"."theme_id" = "lego_theme"."id") LEFT OUTER JOIN "lego_theme" T5 ON ("lego_theme"."parent_id" = T5."id") LEFT OUTER JOIN "lego_theme" T6 ON (T5."parent_id" = T6."id") LEFT OUTER JOIN "lego_setstatstotal" ON ("lego_baseset"."id" = "lego_setstatstotal"."set_id") WHERE ("lego_baseset"."is_active" AND "lego_subset"."parent_set_id" = 270817)
2 similar queries. Duplicated 2 times.
0.51

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1818)
  subsets = self.get_sub_sets()

/home/nathan/rb/site/./lego/models/sets.py in get_sub_sets(1459)
  sets = sorted(sets, key=lambda x: x.set_num_sorted)

85 <div class="tab-pane in" id="tab_alt_builds">
86 <div id="alt_builds_list">
87 {% if is_crawler %}
88 {% get_alternate_builds_tab_html set %}
89 {% endif %}
90 </div>
91 </div>
92 {% endif %}

/home/nathan/rb/site/lego/templates/sets/includes/render_set_main_tabs.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "lego_moc"."baseset_ptr_id",
       "lego_moc"."designer_id",
       "lego_moc"."detail_url",
       "lego_moc"."gallery_url",
       "lego_moc"."bi_url",
       "lego_moc"."cad_url",
       "lego_moc"."video",
       "lego_moc"."bi_type",
       "lego_moc"."is_for_sale",
       "lego_moc"."is_hosted",
       "lego_moc"."cost",
       "lego_moc"."currency_id",
       "lego_moc"."parent_set_1_id",
       "lego_moc"."parent_set_2_id",
       "lego_moc"."parent_set_3_id",
       "lego_moc"."parent_set_4_id",
       "lego_moc"."parent_set_5_id",
       "lego_moc"."parent_inv_1_id",
       "lego_moc"."parent_inv_2_id",
       "lego_moc"."parent_inv_3_id",
       "lego_moc"."parent_inv_4_id",
       "lego_moc"."parent_inv_5_id",
       "lego_moc"."parent_type",
       "lego_moc"."is_allowed_premium",
       "lego_moc"."is_locked",
       "lego_moc"."last_social_post",
       "lego_moc"."is_review_requested",
       EXISTS(
        SELECT 1 AS "a"
          FROM
"lego_mocswitherrors" U0
         WHERE
U0."moc_id" = ("lego_moc"."baseset_ptr_id")
         LIMIT
1
       ) AS "errors_exists",
       "lego_theme"."id",
       "lego_theme"."parent_id",
       "lego_theme"."name",
       "lego_theme"."slug",
       "lego_theme"."set_count",
       "lego_theme"."t1_id",
       "lego_theme"."t1_name",
       "lego_theme"."t2_name",
       "lego_theme"."t3_name",
       "lego_theme"."lego_blurb",
       "lego_theme"."banner_img",
       "lego_theme"."descr",
       T6."id",
       T6."parent_id",
       T6."name",
       T6."slug",
       T6."set_count",
       T6."t1_id",
       T6."t1_name",
       T6."t2_name",
       T6."t3_name",
       T6."lego_blurb",
       T6."banner_img",
       T6."descr",
       T7."id",
       T7."parent_id",
       T7."name",
       T7."slug",
       T7."set_count",
       T7."t1_id",
       T7."t1_name",
       T7."t2_name",
       T7."t3_name",
       T7."lego_blurb",
       T7."banner_img",
       T7."descr",
       "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors",
       "accounts_userplan"."user_id",
       "accounts_userplan"."plan_id",
       "accounts_userplan"."expiry_date",
       "accounts_userplan"."last_paid_date",
       "accounts_userplan"."is_subscription_active",
       "accounts_userplan"."subscription_period",
       "accounts_userplan"."payment_source",
       "accounts_userplan"."stripe_customer_id",
       "accounts_userplan"."stripe_subscription_id",
       "accounts_userplan"."paypal_subscription_id",
       "accounts_userplan"."base_free_plan_id",
       "accounts_userplan"."is_reminder_sent",
       "plans_plan"."id",
       "plans_plan"."type",
       "plans_plan"."version",
       "plans_plan"."stripe_id",
       "plans_plan"."paypal_id",
       "plans_plan"."cost_single",
       "plans_plan"."cost_monthly",
       "plans_plan"."cost_yearly",
       T3."id",
       T3."set_num",
       T3."name",
       T3."year",
       T3."theme_id",
       T3."set_type",
       T3."num_parts",
       T3."default_inventory_id",
       T3."is_active",
       T3."is_accessory",
       T3."added_dt",
       T3."added_by_id",
       T3."last_modified_dt",
       T3."last_modified_by_id",
       T3."last_checked_for_bi",
       T3."descr",
       T3."primary_photo_id",
       T3."is_gear",
       T3."is_book",
       T3."search_vector",
       T3."mfhash_vector",
       "lego_setstatstotal"."set_id",
       "lego_setstatstotal"."hits",
       "lego_setstatstotal"."builds",
       "lego_setstatstotal"."likes",
       "lego_setstatstotal"."bi_downloads",
       "lego_setstatstotal"."featured_hits",
       "lego_setstatstotal"."user_hits"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 INNER JOIN
"lego_baseset" T3
    ON
("lego_moc"."parent_set_1_id" = T3."id")
 INNER JOIN
"lego_theme"
    ON
("lego_baseset"."theme_id" = "lego_theme"."id")
  LEFT OUTER JOIN
"lego_theme" T6
    ON
("lego_theme"."parent_id" = T6."id")
  LEFT OUTER JOIN
"lego_theme" T7
    ON
(T6."parent_id" = T7."id")
 INNER JOIN
"lego_designer"
    ON
("lego_moc"."designer_id" = "lego_designer"."user_ptr_id")
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
  LEFT OUTER JOIN
"accounts_userplan"
    ON
("auth_user"."id" = "accounts_userplan"."user_id")
  LEFT OUTER JOIN
"plans_plan"
    ON
("accounts_userplan"."plan_id" = "plans_plan"."id")
  LEFT OUTER JOIN
"lego_setstatstotal"
    ON
("lego_baseset"."id" = "lego_setstatstotal"."set_id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."parent_set_1_id" IN (270817) AND "lego_moc"."parent_set_2_id" IS NULL AND "lego_moc"."parent_type" = 'A' AND NOT (EXISTS(SELECT 1 AS "a" FROM "lego_mocswitherrors" U0 WHERE U0."moc_id" = ("lego_moc"."baseset_ptr_id") LIMIT 1)))
 ORDER BY
"lego_setstatstotal"."likes" DESC
SELECT ••• FROM "lego_mocswitherrors" U0 WHERE U0."moc_id" = ("lego_moc"."baseset_ptr_id") LIMIT 1) AS "errors_exists", "lego_theme"."id", "lego_theme"."parent_id", "lego_theme"."name", "lego_theme"."slug", "lego_theme"."set_count", "lego_theme"."t1_id", "lego_theme"."t1_name", "lego_theme"."t2_name", "lego_theme"."t3_name", "lego_theme"."lego_blurb", "lego_theme"."banner_img", "lego_theme"."descr", T6."id", T6."parent_id", T6."name", T6."slug", T6."set_count", T6."t1_id", T6."t1_name", T6."t2_name", T6."t3_name", T6."lego_blurb", T6."banner_img", T6."descr", T7."id", T7."parent_id", T7."name", T7."slug", T7."set_count", T7."t1_id", T7."t1_name", T7."t2_name", T7."t3_name", T7."lego_blurb", T7."banner_img", T7."descr", "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined", "lego_designer"."user_ptr_id", "lego_designer"."auto_approve", "lego_designer"."num_auto_approved", "lego_designer"."last_checked_for_moc_errors", "accounts_userplan"."user_id", "accounts_userplan"."plan_id", "accounts_userplan"."expiry_date", "accounts_userplan"."last_paid_date", "accounts_userplan"."is_subscription_active", "accounts_userplan"."subscription_period", "accounts_userplan"."payment_source", "accounts_userplan"."stripe_customer_id", "accounts_userplan"."stripe_subscription_id", "accounts_userplan"."paypal_subscription_id", "accounts_userplan"."base_free_plan_id", "accounts_userplan"."is_reminder_sent", "plans_plan"."id", "plans_plan"."type", "plans_plan"."version", "plans_plan"."stripe_id", "plans_plan"."paypal_id", "plans_plan"."cost_single", "plans_plan"."cost_monthly", "plans_plan"."cost_yearly", T3."id", T3."set_num", T3."name", T3."year", T3."theme_id", T3."set_type", T3."num_parts", T3."default_inventory_id", T3."is_active", T3."is_accessory", T3."added_dt", T3."added_by_id", T3."last_modified_dt", T3."last_modified_by_id", T3."last_checked_for_bi", T3."descr", T3."primary_photo_id", T3."is_gear", T3."is_book", T3."search_vector", T3."mfhash_vector", "lego_setstatstotal"."set_id", "lego_setstatstotal"."hits", "lego_setstatstotal"."builds", "lego_setstatstotal"."likes", "lego_setstatstotal"."bi_downloads", "lego_setstatstotal"."featured_hits", "lego_setstatstotal"."user_hits" FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") INNER JOIN "lego_baseset" T3 ON ("lego_moc"."parent_set_1_id" = T3."id") INNER JOIN "lego_theme" ON ("lego_baseset"."theme_id" = "lego_theme"."id") LEFT OUTER JOIN "lego_theme" T6 ON ("lego_theme"."parent_id" = T6."id") LEFT OUTER JOIN "lego_theme" T7 ON (T6."parent_id" = T7."id") INNER JOIN "lego_designer" ON ("lego_moc"."designer_id" = "lego_designer"."user_ptr_id") INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") LEFT OUTER JOIN "accounts_userplan" ON ("auth_user"."id" = "accounts_userplan"."user_id") LEFT OUTER JOIN "plans_plan" ON ("accounts_userplan"."plan_id" = "plans_plan"."id") LEFT OUTER JOIN "lego_setstatstotal" ON ("lego_baseset"."id" = "lego_setstatstotal"."set_id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."parent_set_1_id" IN (270817) AND "lego_moc"."parent_set_2_id" IS NULL AND "lego_moc"."parent_type" = 'A' AND NOT (EXISTS(SELECT ••• FROM "lego_mocswitherrors" U0 WHERE U0."moc_id" = ("lego_moc"."baseset_ptr_id") LIMIT 1))) ORDER BY "lego_setstatstotal"."likes" DESC
4.85

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1820)
  if len(alt_build) > 0:

85 <div class="tab-pane in" id="tab_alt_builds">
86 <div id="alt_builds_list">
87 {% if is_crawler %}
88 {% get_alternate_builds_tab_html set %}
89 {% endif %}
90 </div>
91 </div>
92 {% endif %}

/home/nathan/rb/site/lego/templates/sets/includes/render_set_main_tabs.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "lego_moc"."baseset_ptr_id",
       "lego_moc"."designer_id",
       "lego_moc"."detail_url",
       "lego_moc"."gallery_url",
       "lego_moc"."bi_url",
       "lego_moc"."cad_url",
       "lego_moc"."video",
       "lego_moc"."bi_type",
       "lego_moc"."is_for_sale",
       "lego_moc"."is_hosted",
       "lego_moc"."cost",
       "lego_moc"."currency_id",
       "lego_moc"."parent_set_1_id",
       "lego_moc"."parent_set_2_id",
       "lego_moc"."parent_set_3_id",
       "lego_moc"."parent_set_4_id",
       "lego_moc"."parent_set_5_id",
       "lego_moc"."parent_inv_1_id",
       "lego_moc"."parent_inv_2_id",
       "lego_moc"."parent_inv_3_id",
       "lego_moc"."parent_inv_4_id",
       "lego_moc"."parent_inv_5_id",
       "lego_moc"."parent_type",
       "lego_moc"."is_allowed_premium",
       "lego_moc"."is_locked",
       "lego_moc"."last_social_post",
       "lego_moc"."is_review_requested",
       "lego_theme"."id",
       "lego_theme"."parent_id",
       "lego_theme"."name",
       "lego_theme"."slug",
       "lego_theme"."set_count",
       "lego_theme"."t1_id",
       "lego_theme"."t1_name",
       "lego_theme"."t2_name",
       "lego_theme"."t3_name",
       "lego_theme"."lego_blurb",
       "lego_theme"."banner_img",
       "lego_theme"."descr",
       T9."id",
       T9."parent_id",
       T9."name",
       T9."slug",
       T9."set_count",
       T9."t1_id",
       T9."t1_name",
       T9."t2_name",
       T9."t3_name",
       T9."lego_blurb",
       T9."banner_img",
       T9."descr",
       T10."id",
       T10."parent_id",
       T10."name",
       T10."slug",
       T10."set_count",
       T10."t1_id",
       T10."t1_name",
       T10."t2_name",
       T10."t3_name",
       T10."lego_blurb",
       T10."banner_img",
       T10."descr",
       "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors",
       "accounts_userplan"."user_id",
       "accounts_userplan"."plan_id",
       "accounts_userplan"."expiry_date",
       "accounts_userplan"."last_paid_date",
       "accounts_userplan"."is_subscription_active",
       "accounts_userplan"."subscription_period",
       "accounts_userplan"."payment_source",
       "accounts_userplan"."stripe_customer_id",
       "accounts_userplan"."stripe_subscription_id",
       "accounts_userplan"."paypal_subscription_id",
       "accounts_userplan"."base_free_plan_id",
       "accounts_userplan"."is_reminder_sent",
       "plans_plan"."id",
       "plans_plan"."type",
       "plans_plan"."version",
       "plans_plan"."stripe_id",
       "plans_plan"."paypal_id",
       "plans_plan"."cost_single",
       "plans_plan"."cost_monthly",
       "plans_plan"."cost_yearly",
       T4."id",
       T4."set_num",
       T4."name",
       T4."year",
       T4."theme_id",
       T4."set_type",
       T4."num_parts",
       T4."default_inventory_id",
       T4."is_active",
       T4."is_accessory",
       T4."added_dt",
       T4."added_by_id",
       T4."last_modified_dt",
       T4."last_modified_by_id",
       T4."last_checked_for_bi",
       T4."descr",
       T4."primary_photo_id",
       T4."is_gear",
       T4."is_book",
       T4."search_vector",
       T4."mfhash_vector",
       "lego_setstatstotal"."set_id",
       "lego_setstatstotal"."hits",
       "lego_setstatstotal"."builds",
       "lego_setstatstotal"."likes",
       "lego_setstatstotal"."bi_downloads",
       "lego_setstatstotal"."featured_hits",
       "lego_setstatstotal"."user_hits"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
  LEFT OUTER JOIN
"lego_baseset" T4
    ON
("lego_moc"."parent_set_1_id" = T4."id")
 INNER JOIN
"lego_theme"
    ON
("lego_baseset"."theme_id" = "lego_theme"."id")
  LEFT OUTER JOIN
"lego_theme" T9
    ON
("lego_theme"."parent_id" = T9."id")
  LEFT OUTER JOIN
"lego_theme" T10
    ON
(T9."parent_id" = T10."id")
 INNER JOIN
"lego_designer"
    ON
("lego_moc"."designer_id" = "lego_designer"."user_ptr_id")
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
  LEFT OUTER JOIN
"accounts_userplan"
    ON
("auth_user"."id" = "accounts_userplan"."user_id")
  LEFT OUTER JOIN
"plans_plan"
    ON
("accounts_userplan"."plan_id" = "plans_plan"."id")
  LEFT OUTER JOIN
"lego_setstatstotal"
    ON
("lego_baseset"."id" = "lego_setstatstotal"."set_id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."parent_set_2_id" IS NOT NULL AND "lego_moc"."parent_type" = 'A' AND ("lego_moc"."parent_set_1_id" = 270817 OR "lego_moc"."parent_set_2_id" = 270817 OR "lego_moc"."parent_set_3_id" = 270817 OR "lego_moc"."parent_set_4_id" = 270817 OR "lego_moc"."parent_set_5_id" = 270817))
 ORDER BY
"lego_setstatstotal"."likes" DESC
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") LEFT OUTER JOIN "lego_baseset" T4 ON ("lego_moc"."parent_set_1_id" = T4."id") INNER JOIN "lego_theme" ON ("lego_baseset"."theme_id" = "lego_theme"."id") LEFT OUTER JOIN "lego_theme" T9 ON ("lego_theme"."parent_id" = T9."id") LEFT OUTER JOIN "lego_theme" T10 ON (T9."parent_id" = T10."id") INNER JOIN "lego_designer" ON ("lego_moc"."designer_id" = "lego_designer"."user_ptr_id") INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") LEFT OUTER JOIN "accounts_userplan" ON ("auth_user"."id" = "accounts_userplan"."user_id") LEFT OUTER JOIN "plans_plan" ON ("accounts_userplan"."plan_id" = "plans_plan"."id") LEFT OUTER JOIN "lego_setstatstotal" ON ("lego_baseset"."id" = "lego_setstatstotal"."set_id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."parent_set_2_id" IS NOT NULL AND "lego_moc"."parent_type" = 'A' AND ("lego_moc"."parent_set_1_id" = 270817 OR "lego_moc"."parent_set_2_id" = 270817 OR "lego_moc"."parent_set_3_id" = 270817 OR "lego_moc"."parent_set_4_id" = 270817 OR "lego_moc"."parent_set_5_id" = 270817)) ORDER BY "lego_setstatstotal"."likes" DESC
5.30

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1822)
  if len(partial_alt_build) > 0:

85 <div class="tab-pane in" id="tab_alt_builds">
86 <div id="alt_builds_list">
87 {% if is_crawler %}
88 {% get_alternate_builds_tab_html set %}
89 {% endif %}
90 </div>
91 </div>
92 {% endif %}

/home/nathan/rb/site/lego/templates/sets/includes/render_set_main_tabs.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "lego_moc"."baseset_ptr_id",
       "lego_moc"."designer_id",
       "lego_moc"."detail_url",
       "lego_moc"."gallery_url",
       "lego_moc"."bi_url",
       "lego_moc"."cad_url",
       "lego_moc"."video",
       "lego_moc"."bi_type",
       "lego_moc"."is_for_sale",
       "lego_moc"."is_hosted",
       "lego_moc"."cost",
       "lego_moc"."currency_id",
       "lego_moc"."parent_set_1_id",
       "lego_moc"."parent_set_2_id",
       "lego_moc"."parent_set_3_id",
       "lego_moc"."parent_set_4_id",
       "lego_moc"."parent_set_5_id",
       "lego_moc"."parent_inv_1_id",
       "lego_moc"."parent_inv_2_id",
       "lego_moc"."parent_inv_3_id",
       "lego_moc"."parent_inv_4_id",
       "lego_moc"."parent_inv_5_id",
       "lego_moc"."parent_type",
       "lego_moc"."is_allowed_premium",
       "lego_moc"."is_locked",
       "lego_moc"."last_social_post",
       "lego_moc"."is_review_requested",
       "lego_theme"."id",
       "lego_theme"."parent_id",
       "lego_theme"."name",
       "lego_theme"."slug",
       "lego_theme"."set_count",
       "lego_theme"."t1_id",
       "lego_theme"."t1_name",
       "lego_theme"."t2_name",
       "lego_theme"."t3_name",
       "lego_theme"."lego_blurb",
       "lego_theme"."banner_img",
       "lego_theme"."descr",
       T9."id",
       T9."parent_id",
       T9."name",
       T9."slug",
       T9."set_count",
       T9."t1_id",
       T9."t1_name",
       T9."t2_name",
       T9."t3_name",
       T9."lego_blurb",
       T9."banner_img",
       T9."descr",
       T10."id",
       T10."parent_id",
       T10."name",
       T10."slug",
       T10."set_count",
       T10."t1_id",
       T10."t1_name",
       T10."t2_name",
       T10."t3_name",
       T10."lego_blurb",
       T10."banner_img",
       T10."descr",
       "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors",
       "accounts_userplan"."user_id",
       "accounts_userplan"."plan_id",
       "accounts_userplan"."expiry_date",
       "accounts_userplan"."last_paid_date",
       "accounts_userplan"."is_subscription_active",
       "accounts_userplan"."subscription_period",
       "accounts_userplan"."payment_source",
       "accounts_userplan"."stripe_customer_id",
       "accounts_userplan"."stripe_subscription_id",
       "accounts_userplan"."paypal_subscription_id",
       "accounts_userplan"."base_free_plan_id",
       "accounts_userplan"."is_reminder_sent",
       "plans_plan"."id",
       "plans_plan"."type",
       "plans_plan"."version",
       "plans_plan"."stripe_id",
       "plans_plan"."paypal_id",
       "plans_plan"."cost_single",
       "plans_plan"."cost_monthly",
       "plans_plan"."cost_yearly",
       T3."id",
       T3."set_num",
       T3."name",
       T3."year",
       T3."theme_id",
       T3."set_type",
       T3."num_parts",
       T3."default_inventory_id",
       T3."is_active",
       T3."is_accessory",
       T3."added_dt",
       T3."added_by_id",
       T3."last_modified_dt",
       T3."last_modified_by_id",
       T3."last_checked_for_bi",
       T3."descr",
       T3."primary_photo_id",
       T3."is_gear",
       T3."is_book",
       T3."search_vector",
       T3."mfhash_vector",
       "lego_setstatstotal"."set_id",
       "lego_setstatstotal"."hits",
       "lego_setstatstotal"."builds",
       "lego_setstatstotal"."likes",
       "lego_setstatstotal"."bi_downloads",
       "lego_setstatstotal"."featured_hits",
       "lego_setstatstotal"."user_hits"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
  LEFT OUTER JOIN
"lego_baseset" T3
    ON
("lego_moc"."parent_set_1_id" = T3."id")
 INNER JOIN
"lego_theme"
    ON
("lego_baseset"."theme_id" = "lego_theme"."id")
  LEFT OUTER JOIN
"lego_theme" T9
    ON
("lego_theme"."parent_id" = T9."id")
  LEFT OUTER JOIN
"lego_theme" T10
    ON
(T9."parent_id" = T10."id")
 INNER JOIN
"lego_designer"
    ON
("lego_moc"."designer_id" = "lego_designer"."user_ptr_id")
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
  LEFT OUTER JOIN
"accounts_userplan"
    ON
("auth_user"."id" = "accounts_userplan"."user_id")
  LEFT OUTER JOIN
"plans_plan"
    ON
("accounts_userplan"."plan_id" = "plans_plan"."id")
  LEFT OUTER JOIN
"lego_setstatstotal"
    ON
("lego_baseset"."id" = "lego_setstatstotal"."set_id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."parent_type" = 'M' AND ("lego_moc"."parent_set_1_id" = 270817 OR "lego_moc"."parent_set_2_id" = 270817 OR "lego_moc"."parent_set_3_id" = 270817 OR "lego_moc"."parent_set_4_id" = 270817 OR "lego_moc"."parent_set_5_id" = 270817))
 ORDER BY
"lego_setstatstotal"."likes" DESC
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") LEFT OUTER JOIN "lego_baseset" T3 ON ("lego_moc"."parent_set_1_id" = T3."id") INNER JOIN "lego_theme" ON ("lego_baseset"."theme_id" = "lego_theme"."id") LEFT OUTER JOIN "lego_theme" T9 ON ("lego_theme"."parent_id" = T9."id") LEFT OUTER JOIN "lego_theme" T10 ON (T9."parent_id" = T10."id") INNER JOIN "lego_designer" ON ("lego_moc"."designer_id" = "lego_designer"."user_ptr_id") INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") LEFT OUTER JOIN "accounts_userplan" ON ("auth_user"."id" = "accounts_userplan"."user_id") LEFT OUTER JOIN "plans_plan" ON ("accounts_userplan"."plan_id" = "plans_plan"."id") LEFT OUTER JOIN "lego_setstatstotal" ON ("lego_baseset"."id" = "lego_setstatstotal"."set_id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."parent_type" = 'M' AND ("lego_moc"."parent_set_1_id" = 270817 OR "lego_moc"."parent_set_2_id" = 270817 OR "lego_moc"."parent_set_3_id" = 270817 OR "lego_moc"."parent_set_4_id" = 270817 OR "lego_moc"."parent_set_5_id" = 270817)) ORDER BY "lego_setstatstotal"."likes" DESC
3.14

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1824)
  if len(moc_mods) > 0:

85 <div class="tab-pane in" id="tab_alt_builds">
86 <div id="alt_builds_list">
87 {% if is_crawler %}
88 {% get_alternate_builds_tab_html set %}
89 {% endif %}
90 </div>
91 </div>
92 {% endif %}

/home/nathan/rb/site/lego/templates/sets/includes/render_set_main_tabs.html

SELECT DISTINCT ("taggit_taggeditem"."object_id") AS "_prefetch_related_val",
       "taggit_tag"."id",
       "taggit_tag"."name",
       "taggit_tag"."slug"
  FROM
"taggit_tag"
 INNER JOIN
"taggit_taggeditem"
    ON
("taggit_tag"."id" = "taggit_taggeditem"."tag_id")
 INNER JOIN
"django_content_type"
    ON
("taggit_taggeditem"."content_type_id" = "django_content_type"."id")
 WHERE
("django_content_type"."app_label" = 'lego' AND "django_content_type"."model" = 'moc' AND "taggit_taggeditem"."object_id" IN (307812, 307945, 307850, 308268, 288753, 303957, 287451, 289244, 287614))
SELECT ••• FROM "taggit_tag" INNER JOIN "taggit_taggeditem" ON ("taggit_tag"."id" = "taggit_taggeditem"."tag_id") INNER JOIN "django_content_type" ON ("taggit_taggeditem"."content_type_id" = "django_content_type"."id") WHERE ("django_content_type"."app_label" = 'lego' AND "django_content_type"."model" = 'moc' AND "taggit_taggeditem"."object_id" IN (307812, 307945, 307850, 308268, 288753, 303957, 287451, 289244, 287614))
1.00

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1824)
  if len(moc_mods) > 0:

85 <div class="tab-pane in" id="tab_alt_builds">
86 <div id="alt_builds_list">
87 {% if is_crawler %}
88 {% get_alternate_builds_tab_html set %}
89 {% endif %}
90 </div>
91 </div>
92 {% endif %}

/home/nathan/rb/site/lego/templates/sets/includes/render_set_main_tabs.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 723327)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 723327) LIMIT 21
41 similar queries. Duplicated 2 times.
0.34

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.170946+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.170943+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '287104')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.170946+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.170943+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '287104') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.54

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 287104
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 287104 LIMIT 1
49 similar queries.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 465134)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 465134) LIMIT 21
41 similar queries.
0.21

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.176284+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.176281+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '290371')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.176284+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.176281+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '290371') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.39

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 290371
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 290371 LIMIT 1
49 similar queries.
0.09

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 740211)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 740211) LIMIT 21
41 similar queries.
0.29

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.180844+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.180842+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '291518')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.180844+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.180842+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '291518') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.33

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 291518
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 291518 LIMIT 1
49 similar queries.
0.07

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.183982+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.183981+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '296902')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.183982+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.183981+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '296902') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.33

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 296902
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 296902 LIMIT 1
49 similar queries.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 279731)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 279731) LIMIT 21
41 similar queries. Duplicated 5 times.
0.14

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.189152+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.189150+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '291811')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.189152+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.189150+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '291811') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.37

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 291811
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 291811 LIMIT 1
49 similar queries.
0.08

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 294293
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 294293 LIMIT 1
49 similar queries.
0.07

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}
184 {% if set.is_moc and set.get_moc.is_alternate %}
185 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"> Alt</span></span>
186 {% endif %}
187 {% endif %}
188

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 197632)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 197632) LIMIT 21
41 similar queries. Duplicated 4 times.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.194753+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.194752+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '294081')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.194753+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.194752+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '294081') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.31

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 294081
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 294081 LIMIT 1
49 similar queries.
0.09

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 253462)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 253462) LIMIT 21
41 similar queries. Duplicated 10 times.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.198809+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.198807+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '288526')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.198809+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.198807+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '288526') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.46

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 288526
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 288526 LIMIT 1
49 similar queries.
0.09

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.202419+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.202418+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '305215')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.202419+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.202418+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '305215') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.34

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 305215
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 305215 LIMIT 1
49 similar queries.
0.07

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 834806)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 834806) LIMIT 21
41 similar queries. Duplicated 4 times.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.206548+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.206547+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '286152')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.206548+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.206547+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '286152') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.30

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 286152
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 286152 LIMIT 1
49 similar queries.
0.08

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 297685
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 297685 LIMIT 1
49 similar queries.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}
184 {% if set.is_moc and set.get_moc.is_alternate %}
185 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"> Alt</span></span>
186 {% endif %}
187 {% endif %}
188

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.212397+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.212395+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '291912')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.212397+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.212395+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '291912') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.39

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 291912
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 291912 LIMIT 1
49 similar queries.
0.09

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 834806)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 834806) LIMIT 21
41 similar queries. Duplicated 4 times.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.218181+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.218180+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '287293')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.218181+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.218180+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '287293') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.31

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 287293
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 287293 LIMIT 1
49 similar queries.
0.07

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 665704)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 665704) LIMIT 21
41 similar queries. Duplicated 4 times.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.222031+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.222029+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '291965')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.222031+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.222029+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '291965') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.34

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 291965
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 291965 LIMIT 1
49 similar queries.
0.08

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 834806)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 834806) LIMIT 21
41 similar queries. Duplicated 4 times.
0.14

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.226671+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.226669+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '287851')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.226671+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.226669+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '287851') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.34

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 287851
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 287851 LIMIT 1
49 similar queries.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.230491+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.230490+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '289536')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.230491+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.230490+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '289536') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.34

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 289536
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 289536 LIMIT 1
49 similar queries.
0.09

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 834806)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 834806) LIMIT 21
41 similar queries. Duplicated 4 times.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.235161+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.235158+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '286396')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.235161+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.235158+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '286396') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.59

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 286396
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 286396 LIMIT 1
49 similar queries.
0.09

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 253462)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 253462) LIMIT 21
41 similar queries. Duplicated 10 times.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.239772+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.239770+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '290961')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.239772+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.239770+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '290961') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.45

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 290961
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 290961 LIMIT 1
49 similar queries.
0.08

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 1229206)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 1229206) LIMIT 21
41 similar queries.
0.28

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.244123+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.244122+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '305446')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.244123+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.244122+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '305446') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.40

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 305446
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 305446 LIMIT 1
49 similar queries.
0.14

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 253462)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 253462) LIMIT 21
41 similar queries. Duplicated 10 times.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.248297+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.248295+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '300503')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.248297+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.248295+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '300503') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.56

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 300503
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 300503 LIMIT 1
49 similar queries.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 253462)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 253462) LIMIT 21
41 similar queries. Duplicated 10 times.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.252977+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.252974+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '296921')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.252977+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.252974+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '296921') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.31

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 296921
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 296921 LIMIT 1
49 similar queries.
0.07

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 355708)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 355708) LIMIT 21
41 similar queries.
0.28

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.257065+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.257063+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '292409')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.257065+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.257063+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '292409') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.28

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 292409
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 292409 LIMIT 1
49 similar queries.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 253462)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 253462) LIMIT 21
41 similar queries. Duplicated 10 times.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.261193+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.261191+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '290828')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.261193+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.261191+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '290828') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.59

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 290828
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 290828 LIMIT 1
49 similar queries.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 253462)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 253462) LIMIT 21
41 similar queries. Duplicated 10 times.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.266198+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.266196+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '300816')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.266198+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.266196+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '300816') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.33

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 300816
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 300816 LIMIT 1
49 similar queries.
0.08

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 253462)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 253462) LIMIT 21
41 similar queries. Duplicated 10 times.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.270248+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.270247+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '290829')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.270248+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.270247+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '290829') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.39

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 290829
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 290829 LIMIT 1
49 similar queries.
0.08

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 253462)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 253462) LIMIT 21
41 similar queries. Duplicated 10 times.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 295010
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 295010 LIMIT 1
49 similar queries.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}
184 {% if set.is_moc and set.get_moc.is_alternate %}
185 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"> Alt</span></span>
186 {% endif %}
187 {% endif %}
188

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 310243
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 310243 LIMIT 1
49 similar queries.
0.09

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}
184 {% if set.is_moc and set.get_moc.is_alternate %}
185 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"> Alt</span></span>
186 {% endif %}
187 {% endif %}
188

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 253462)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 253462) LIMIT 21
41 similar queries. Duplicated 10 times.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.280796+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.280794+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '298663')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.280796+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.280794+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '298663') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.35

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 298663
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 298663 LIMIT 1
49 similar queries.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 286807
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 286807 LIMIT 1
49 similar queries.
0.35

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}
184 {% if set.is_moc and set.get_moc.is_alternate %}
185 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"> Alt</span></span>
186 {% endif %}
187 {% endif %}
188

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.286512+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.286510+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '309062')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.286512+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.286510+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '309062') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.39

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 309062
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 309062 LIMIT 1
49 similar queries.
0.09

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 197632)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 197632) LIMIT 21
41 similar queries. Duplicated 4 times.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 303830
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 303830 LIMIT 1
49 similar queries.
0.09

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}
184 {% if set.is_moc and set.get_moc.is_alternate %}
185 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"> Alt</span></span>
186 {% endif %}
187 {% endif %}
188

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 290688
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 290688 LIMIT 1
49 similar queries.
0.09

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}
184 {% if set.is_moc and set.get_moc.is_alternate %}
185 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"> Alt</span></span>
186 {% endif %}
187 {% endif %}
188

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 279731)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 279731) LIMIT 21
41 similar queries. Duplicated 5 times.
0.21

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.295666+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.295664+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '289989')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.295666+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.295664+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '289989') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.40

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 289989
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 289989 LIMIT 1
49 similar queries.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector"
  FROM
"lego_baseset"
 WHERE
"lego_baseset"."id" = 270817
 LIMIT
21
SELECT ••• FROM "lego_baseset" WHERE "lego_baseset"."id" = 270817 LIMIT 21
21 similar queries. Duplicated 16 times.
0.19

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}
181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 591017)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 591017) LIMIT 21
41 similar queries.
0.63

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.302296+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.302294+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '304680')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.302296+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.302294+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '304680') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.34

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 304680
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 304680 LIMIT 1
49 similar queries.
0.07

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector"
  FROM
"lego_baseset"
 WHERE
"lego_baseset"."id" = 270817
 LIMIT
21
SELECT ••• FROM "lego_baseset" WHERE "lego_baseset"."id" = 270817 LIMIT 21
21 similar queries. Duplicated 16 times.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}
181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 723327)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 723327) LIMIT 21
41 similar queries. Duplicated 2 times.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.307537+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.307535+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '289647')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.307537+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.307535+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '289647') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.34

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 289647
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 289647 LIMIT 1
49 similar queries.
0.08

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector"
  FROM
"lego_baseset"
 WHERE
"lego_baseset"."id" = 270817
 LIMIT
21
SELECT ••• FROM "lego_baseset" WHERE "lego_baseset"."id" = 270817 LIMIT 21
21 similar queries. Duplicated 16 times.
0.19

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}
181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 955226)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 955226) LIMIT 21
41 similar queries.
0.50

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.314782+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.314779+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '296970')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.314782+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.314779+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '296970') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.43

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 296970
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 296970 LIMIT 1
49 similar queries.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector"
  FROM
"lego_baseset"
 WHERE
"lego_baseset"."id" = 270817
 LIMIT
21
SELECT ••• FROM "lego_baseset" WHERE "lego_baseset"."id" = 270817 LIMIT 21
21 similar queries. Duplicated 16 times.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}
181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 939939)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 939939) LIMIT 21
41 similar queries. Duplicated 2 times.
0.37

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.321667+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.321664+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '294672')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.321667+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.321664+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '294672') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.55

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 294672
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 294672 LIMIT 1
49 similar queries.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector"
  FROM
"lego_baseset"
 WHERE
"lego_baseset"."id" = 270817
 LIMIT
21
SELECT ••• FROM "lego_baseset" WHERE "lego_baseset"."id" = 270817 LIMIT 21
21 similar queries. Duplicated 16 times.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}
181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 279731)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 279731) LIMIT 21
41 similar queries. Duplicated 5 times.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.328172+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.328170+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '296576')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.328172+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.328170+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '296576') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.44

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 296576
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 296576 LIMIT 1
49 similar queries.
0.09

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector"
  FROM
"lego_baseset"
 WHERE
"lego_baseset"."id" = 270817
 LIMIT
21
SELECT ••• FROM "lego_baseset" WHERE "lego_baseset"."id" = 270817 LIMIT 21
21 similar queries. Duplicated 16 times.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}
181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 662725)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 662725) LIMIT 21
41 similar queries.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.333822+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.333820+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '306507')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.333822+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.333820+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '306507') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.54

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 306507
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 306507 LIMIT 1
49 similar queries.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector"
  FROM
"lego_baseset"
 WHERE
"lego_baseset"."id" = 270817
 LIMIT
21
SELECT ••• FROM "lego_baseset" WHERE "lego_baseset"."id" = 270817 LIMIT 21
21 similar queries. Duplicated 16 times.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}
181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.338364+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.338363+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '286038')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.338364+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.338363+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '286038') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.40

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 286038
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 286038 LIMIT 1
49 similar queries.
0.08

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector"
  FROM
"lego_baseset"
 WHERE
"lego_baseset"."id" = 270817
 LIMIT
21
SELECT ••• FROM "lego_baseset" WHERE "lego_baseset"."id" = 270817 LIMIT 21
21 similar queries. Duplicated 16 times.
0.14

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}
181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.342204+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.342203+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '307701')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.342204+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.342203+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '307701') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.32

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 307701
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 307701 LIMIT 1
49 similar queries.
0.08

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector"
  FROM
"lego_baseset"
 WHERE
"lego_baseset"."id" = 270817
 LIMIT
21
SELECT ••• FROM "lego_baseset" WHERE "lego_baseset"."id" = 270817 LIMIT 21
21 similar queries. Duplicated 16 times.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}
181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.345970+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.345969+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '299842')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.345970+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.345969+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '299842') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.29

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 299842
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 299842 LIMIT 1
49 similar queries.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector"
  FROM
"lego_baseset"
 WHERE
"lego_baseset"."id" = 98028
 LIMIT
21
SELECT ••• FROM "lego_baseset" WHERE "lego_baseset"."id" = 98028 LIMIT 21
21 similar queries.
0.19

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}
181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.350898+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.350896+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '287878')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.350898+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.350896+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '287878') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.32

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 287878
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 287878 LIMIT 1
49 similar queries.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector"
  FROM
"lego_baseset"
 WHERE
"lego_baseset"."id" = 270817
 LIMIT
21
SELECT ••• FROM "lego_baseset" WHERE "lego_baseset"."id" = 270817 LIMIT 21
21 similar queries. Duplicated 16 times.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}
181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 279731)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 279731) LIMIT 21
41 similar queries. Duplicated 5 times.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.356519+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.356517+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '293680')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.356519+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.356517+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '293680') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.29

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 293680
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 293680 LIMIT 1
49 similar queries.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector"
  FROM
"lego_baseset"
 WHERE
"lego_baseset"."id" = 270817
 LIMIT
21
SELECT ••• FROM "lego_baseset" WHERE "lego_baseset"."id" = 270817 LIMIT 21
21 similar queries. Duplicated 16 times.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}
181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 279731)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 279731) LIMIT 21
41 similar queries. Duplicated 5 times.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.362872+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.362870+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '290641')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.362872+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.362870+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '290641') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.39

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 290641
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 290641 LIMIT 1
49 similar queries.
0.08

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector"
  FROM
"lego_baseset"
 WHERE
"lego_baseset"."id" = 217487
 LIMIT
21
SELECT ••• FROM "lego_baseset" WHERE "lego_baseset"."id" = 217487 LIMIT 21
21 similar queries.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}
181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.366937+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.366936+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '292210')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.366937+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.366936+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '292210') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.31

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 292210
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 292210 LIMIT 1
49 similar queries.
0.07

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector"
  FROM
"lego_baseset"
 WHERE
"lego_baseset"."id" = 270817
 LIMIT
21
SELECT ••• FROM "lego_baseset" WHERE "lego_baseset"."id" = 270817 LIMIT 21
21 similar queries. Duplicated 16 times.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}
181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.370895+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.370894+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '287600')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.370895+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.370894+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '287600') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.48

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 287600
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 287600 LIMIT 1
49 similar queries.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector"
  FROM
"lego_baseset"
 WHERE
"lego_baseset"."id" = 270817
 LIMIT
21
SELECT ••• FROM "lego_baseset" WHERE "lego_baseset"."id" = 270817 LIMIT 21
21 similar queries. Duplicated 16 times.
0.19

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}
181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.376311+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.376308+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '298870')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.376311+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.376308+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '298870') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.39

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 298870
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 298870 LIMIT 1
49 similar queries.
0.09

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector"
  FROM
"lego_baseset"
 WHERE
"lego_baseset"."id" = 270816
 LIMIT
21
SELECT ••• FROM "lego_baseset" WHERE "lego_baseset"."id" = 270816 LIMIT 21
21 similar queries.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}
181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 253462)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 253462) LIMIT 21
41 similar queries. Duplicated 10 times.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.381778+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.381776+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '293557')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.381778+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.381776+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '293557') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.39

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT 1 AS "a"
  FROM
"lego_mocswitherrors"
 WHERE
"lego_mocswitherrors"."moc_id" = 293557
 LIMIT
1
SELECT ••• FROM "lego_mocswitherrors" WHERE "lego_mocswitherrors"."moc_id" = 293557 LIMIT 1
49 similar queries.
0.08

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in is_alternate(204)
  if not self.is_pending and MocsWithErrors.objects.filter(moc=self).exists():

173 <span class="label label-danger size-10">{{ discount_pct }}</span>
174 </span>
175 {% else %}
176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector"
  FROM
"lego_baseset"
 WHERE
"lego_baseset"."id" = 270817
 LIMIT
21
SELECT ••• FROM "lego_baseset" WHERE "lego_baseset"."id" = 270817 LIMIT 21
21 similar queries. Duplicated 16 times.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

176 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> {% if set.get_moc.is_alternate %}Prem{% else %}Premium{% endif %}</span></span>
177 {% endif %}
178 {% if set.is_moc and set.get_moc.is_alternate %}
179 <span class="label label-altbuild size-10" title="Alternate Build MOC{% if set.get_moc.parent_set_2 %}{% else %} - only uses parts from {{ set.get_moc.parent_set_1 }}{% endif %}"><i class="fa fa-fw fa-retweet text-white"></i> <span class="hidden-xs"></span> {% if not discount_pct %}Alt{% endif %}</span>
180 {% endif %}
181 {% endwith %}
182 {% else %}
183 {# repeat alt label check here so dont have to recalculate discount #}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 939939)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 939939) LIMIT 21
41 similar queries. Duplicated 2 times.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(654)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(269)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(263)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

87 <div class="clearfix trunc mb-6 size-12">
88 {% if set|get_class == 'Moc' %}
89 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
90 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
91 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
92 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
93 {% elif set.moc and set.moc.designer.username %}
94 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.388238+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.388236+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '287614')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.388238+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.388236+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '287614') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.36

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.390450+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.390449+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '289244')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.390450+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.390449+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '289244') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.37

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.393522+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.393520+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '307850')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.393522+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.393520+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '307850') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.31

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.395700+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.395699+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '288753')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.395700+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.395699+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '288753') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.34

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.398141+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.398139+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '308268')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.398141+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.398139+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '308268') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.39

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.400495+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.400494+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '307812')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.400495+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.400494+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '307812') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.32

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_designerdiscount"."id",
       "lego_designerdiscount"."designer_id",
       "lego_designerdiscount"."name",
       "lego_designerdiscount"."start_date",
       "lego_designerdiscount"."end_date",
       "lego_designerdiscount"."discount_pct",
       "lego_designerdiscount"."mocs"
  FROM
"lego_designerdiscount"
 WHERE
("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.402541+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.402539+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '307945')
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-01-22T06:23:06.402541+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-01-22T06:23:06.402539+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '307945') ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
49 similar queries.
0.27

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/models/mocs.py in get_discount_pct(362)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(440)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

166
167 {# Premium MOCs #}
168 {% if set.is_moc and set.get_moc.is_for_sale %}
169 {% with set.get_discount_pct as discount_pct %}
170 {% if discount_pct %}
171 <span class="label-group">
172 <span class="label label-dark-blue size-10" title="Premium MOC"><i class="fa fa-fw fa-bolt text-yellow"></i><span class="hidden-xs hidden-sm"> Prem</span></span>
173 <span class="label label-danger size-10">{{ discount_pct }}</span>

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_inventory"."id",
       "lego_inventory"."set_id",
       "lego_inventory"."version",
       "lego_inventory"."name",
       "lego_inventory"."is_active",
       "lego_inventory"."num_parts",
       "lego_inventory"."num_versions"
  FROM
"lego_inventory"
 WHERE
"lego_inventory"."id" = 302779
 LIMIT
21
SELECT ••• FROM "lego_inventory" WHERE "lego_inventory"."id" = 302779 LIMIT 21
3 similar queries.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(24)
  inventory = set.get_default_inventory()

/home/nathan/rb/site/./lego/models/sets.py in get_default_inventory(971)
  if self.default_inventory is not None:

14 {% include 'sets/render_set.html' with set=set title=set.name hide_details=True tn_options=settings.THUMBS_OPTIONS_MOC_TILE %}
15 </div>
16 {% else %}
17 <div class="col-xs-6 col-sm-4 col-md-3 col-condensed">{% render_set set tn_options=settings.THUMBS_OPTIONS_SET_TILE %}</div>
18 {% endif %}
19 {% endfor %}
20 </div>
21 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_alt_build_list.html

SELECT "lego_setphoto"."id",
       "lego_setphoto"."set_id",
       "lego_setphoto"."photo_type_id",
       "lego_setphoto"."submitted_by_id",
       "lego_setphoto"."timestamp",
       "lego_setphoto"."is_active",
       "lego_setphoto"."is_primary"
  FROM
"lego_setphoto"
 WHERE
"lego_setphoto"."id" = 162482
 LIMIT
21
SELECT ••• FROM "lego_setphoto" WHERE "lego_setphoto"."id" = 162482 LIMIT 21
3 similar queries.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(32)
  return render_to_string('sets/render_set.html',

/home/nathan/rb/site/./lego/models/sets.py in img_dir(751)
  file_dir = self.primary_photo.get_img_dir()

42 {# Image #}
43 <div class="clearfix {% if set.is_figure %} js-hover-card{% endif %}" {% if set.is_figure %}data-hover="{% url 'minfig_hover' set.set_num %}"{% endif %}>
44 <a href="{{ set.get_absolute_url }}{% if inventory and not set.is_moc %}?inventory={{ inventory.version }}{% endif %}">
45 {% if not set.img_dir and set.is_figure %}
46 {% include 'lego/includes/render_set_img.html' with img_file='nil_mf.jpg' tn_options=tn_options %}
47 {% else %}
48 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=tn_options %}
49 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector"
  FROM
"lego_baseset"
 WHERE
"lego_baseset"."id" = 298590
 LIMIT
21
SELECT ••• FROM "lego_baseset" WHERE "lego_baseset"."id" = 298590 LIMIT 21
21 similar queries.
0.18

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(32)
  return render_to_string('sets/render_set.html',

/home/nathan/rb/site/./lego/models/sets.py in img_dir(751)
  file_dir = self.primary_photo.get_img_dir()

/home/nathan/rb/site/./lego/models/sets.py in get_img_dir(3133)
  return os.path.join('sets', self.set.set_num.lower(), str(self.id) + '.jpg')

42 {# Image #}
43 <div class="clearfix {% if set.is_figure %} js-hover-card{% endif %}" {% if set.is_figure %}data-hover="{% url 'minfig_hover' set.set_num %}"{% endif %}>
44 <a href="{{ set.get_absolute_url }}{% if inventory and not set.is_moc %}?inventory={{ inventory.version }}{% endif %}">
45 {% if not set.img_dir and set.is_figure %}
46 {% include 'lego/includes/render_set_img.html' with img_file='nil_mf.jpg' tn_options=tn_options %}
47 {% else %}
48 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=tn_options %}
49 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_inventory"."id",
       "lego_inventory"."set_id",
       "lego_inventory"."version",
       "lego_inventory"."name",
       "lego_inventory"."is_active",
       "lego_inventory"."num_parts",
       "lego_inventory"."num_versions"
  FROM
"lego_inventory"
 WHERE
"lego_inventory"."id" = 303365
 LIMIT
21
SELECT ••• FROM "lego_inventory" WHERE "lego_inventory"."id" = 303365 LIMIT 21
3 similar queries.
0.14

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(24)
  inventory = set.get_default_inventory()

/home/nathan/rb/site/./lego/models/sets.py in get_default_inventory(971)
  if self.default_inventory is not None:

14 {% include 'sets/render_set.html' with set=set title=set.name hide_details=True tn_options=settings.THUMBS_OPTIONS_MOC_TILE %}
15 </div>
16 {% else %}
17 <div class="col-xs-6 col-sm-4 col-md-3 col-condensed">{% render_set set tn_options=settings.THUMBS_OPTIONS_SET_TILE %}</div>
18 {% endif %}
19 {% endfor %}
20 </div>
21 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_alt_build_list.html

SELECT "lego_setphoto"."id",
       "lego_setphoto"."set_id",
       "lego_setphoto"."photo_type_id",
       "lego_setphoto"."submitted_by_id",
       "lego_setphoto"."timestamp",
       "lego_setphoto"."is_active",
       "lego_setphoto"."is_primary"
  FROM
"lego_setphoto"
 WHERE
"lego_setphoto"."id" = 162697
 LIMIT
21
SELECT ••• FROM "lego_setphoto" WHERE "lego_setphoto"."id" = 162697 LIMIT 21
3 similar queries.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(32)
  return render_to_string('sets/render_set.html',

/home/nathan/rb/site/./lego/models/sets.py in img_dir(751)
  file_dir = self.primary_photo.get_img_dir()

42 {# Image #}
43 <div class="clearfix {% if set.is_figure %} js-hover-card{% endif %}" {% if set.is_figure %}data-hover="{% url 'minfig_hover' set.set_num %}"{% endif %}>
44 <a href="{{ set.get_absolute_url }}{% if inventory and not set.is_moc %}?inventory={{ inventory.version }}{% endif %}">
45 {% if not set.img_dir and set.is_figure %}
46 {% include 'lego/includes/render_set_img.html' with img_file='nil_mf.jpg' tn_options=tn_options %}
47 {% else %}
48 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=tn_options %}
49 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector"
  FROM
"lego_baseset"
 WHERE
"lego_baseset"."id" = 299175
 LIMIT
21
SELECT ••• FROM "lego_baseset" WHERE "lego_baseset"."id" = 299175 LIMIT 21
21 similar queries.
0.12

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in get_alternate_builds_tab_html(283)
  return set.get_alternate_builds_tab_html(context['request'])[0]

/home/nathan/rb/site/./lego/models/sets.py in get_alternate_builds_tab_html(1850)
  html = render_to_string('sets/render_alt_build_list.html', context, request=request)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(32)
  return render_to_string('sets/render_set.html',

/home/nathan/rb/site/./lego/models/sets.py in img_dir(751)
  file_dir = self.primary_photo.get_img_dir()

/home/nathan/rb/site/./lego/models/sets.py in get_img_dir(3133)
  return os.path.join('sets', self.set.set_num.lower(), str(self.id) + '.jpg')

42 {# Image #}
43 <div class="clearfix {% if set.is_figure %} js-hover-card{% endif %}" {% if set.is_figure %}data-hover="{% url 'minfig_hover' set.set_num %}"{% endif %}>
44 <a href="{{ set.get_absolute_url }}{% if inventory and not set.is_moc %}?inventory={{ inventory.version }}{% endif %}">
45 {% if not set.img_dir and set.is_figure %}
46 {% include 'lego/includes/render_set_img.html' with img_file='nil_mf.jpg' tn_options=tn_options %}
47 {% else %}
48 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=tn_options %}
49 {% endif %}

/home/nathan/rb/site/lego/templates/sets/render_set.html

SELECT "lego_setinstructions"."id",
       "lego_setinstructions"."set_id",
       "lego_setinstructions"."timestamp",
       "lego_setinstructions"."descr",
       "lego_setinstructions"."file_size",
       "lego_setinstructions"."preview_img",
       "lego_setinstructions"."is_alt",
       "lego_setinstructions"."lego_url",
       "lego_setinstructions"."file_id"
  FROM
"lego_setinstructions"
 WHERE
"lego_setinstructions"."set_id" = 270817
 ORDER BY
"lego_setinstructions"."descr" ASC
SELECT ••• FROM "lego_setinstructions" WHERE "lego_setinstructions"."set_id" = 270817 ORDER BY "lego_setinstructions"."descr" ASC
0.40

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

7 <p>The known <a href="{% url 'set_instructions' set.set_num %}">building instruction files for {{ set }}</a> are listed below.</p>
8
9 <div class="display-flex">
10 {% for bi in set.instructions.all %}
11 <div class="xflex-1 xcol-sm-3 mb-10 min-height-250 p-10" style="width:25%">
12 <a href="{{ bi.get_download_url }}" target="_blank">
13 {% thumbs bi.get_preview_img settings.THUMBS_OPTIONS_SET_BI_TILE as img %}
14 <img class="img-responsive" {% if not part.no_lazy %}src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-{% endif %}src="{% cachebuster img.url %}" width="{{ img.width }}" height="{{ img.height }}" title="{{ bi.descr }}" alt="LEGO Building Instructions for {{ set }} - {{ bi.descr }}">

/home/nathan/rb/site/lego/templates/sets/includes/render_set_bi_list.html

SELECT "lego_files_s3file"."id",
       "lego_files_s3file"."file_size",
       "lego_files_s3file"."last_modified",
       "lego_files_s3file"."aws_mi_file",
       "lego_files_s3file"."linode_si_file",
       "lego_files_s3file"."linode_mi_file",
       "lego_files_s3file"."linode_media_file"
  FROM
"lego_files_s3file"
 WHERE
"lego_files_s3file"."id" = 658627
 LIMIT
21
SELECT ••• FROM "lego_files_s3file" WHERE "lego_files_s3file"."id" = 658627 LIMIT 21
6 similar queries.
0.65

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/models/sets.py in get_download_url(3084)
  if self.file:

9 <div class="display-flex">
10 {% for bi in set.instructions.all %}
11 <div class="xflex-1 xcol-sm-3 mb-10 min-height-250 p-10" style="width:25%">
12 <a href="{{ bi.get_download_url }}" target="_blank">
13 {% thumbs bi.get_preview_img settings.THUMBS_OPTIONS_SET_BI_TILE as img %}
14 <img class="img-responsive" {% if not part.no_lazy %}src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-{% endif %}src="{% cachebuster img.url %}" width="{{ img.width }}" height="{{ img.height }}" title="{{ bi.descr }}" alt="LEGO Building Instructions for {{ set }} - {{ bi.descr }}">
15 <br><span class="" title="{{ bi.descr }}">{{ bi.descr }}</span>
16 {% if bi.is_alt %}

/home/nathan/rb/site/lego/templates/sets/includes/render_set_bi_list.html

SELECT "lego_files_s3file"."id",
       "lego_files_s3file"."file_size",
       "lego_files_s3file"."last_modified",
       "lego_files_s3file"."aws_mi_file",
       "lego_files_s3file"."linode_si_file",
       "lego_files_s3file"."linode_mi_file",
       "lego_files_s3file"."linode_media_file"
  FROM
"lego_files_s3file"
 WHERE
"lego_files_s3file"."id" = 658630
 LIMIT
21
SELECT ••• FROM "lego_files_s3file" WHERE "lego_files_s3file"."id" = 658630 LIMIT 21
6 similar queries.
0.22

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/models/sets.py in get_download_url(3084)
  if self.file:

9 <div class="display-flex">
10 {% for bi in set.instructions.all %}
11 <div class="xflex-1 xcol-sm-3 mb-10 min-height-250 p-10" style="width:25%">
12 <a href="{{ bi.get_download_url }}" target="_blank">
13 {% thumbs bi.get_preview_img settings.THUMBS_OPTIONS_SET_BI_TILE as img %}
14 <img class="img-responsive" {% if not part.no_lazy %}src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-{% endif %}src="{% cachebuster img.url %}" width="{{ img.width }}" height="{{ img.height }}" title="{{ bi.descr }}" alt="LEGO Building Instructions for {{ set }} - {{ bi.descr }}">
15 <br><span class="" title="{{ bi.descr }}">{{ bi.descr }}</span>
16 {% if bi.is_alt %}

/home/nathan/rb/site/lego/templates/sets/includes/render_set_bi_list.html

SELECT "lego_files_s3file"."id",
       "lego_files_s3file"."file_size",
       "lego_files_s3file"."last_modified",
       "lego_files_s3file"."aws_mi_file",
       "lego_files_s3file"."linode_si_file",
       "lego_files_s3file"."linode_mi_file",
       "lego_files_s3file"."linode_media_file"
  FROM
"lego_files_s3file"
 WHERE
"lego_files_s3file"."id" = 658628
 LIMIT
21
SELECT ••• FROM "lego_files_s3file" WHERE "lego_files_s3file"."id" = 658628 LIMIT 21
6 similar queries.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/models/sets.py in get_download_url(3084)
  if self.file:

9 <div class="display-flex">
10 {% for bi in set.instructions.all %}
11 <div class="xflex-1 xcol-sm-3 mb-10 min-height-250 p-10" style="width:25%">
12 <a href="{{ bi.get_download_url }}" target="_blank">
13 {% thumbs bi.get_preview_img settings.THUMBS_OPTIONS_SET_BI_TILE as img %}
14 <img class="img-responsive" {% if not part.no_lazy %}src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-{% endif %}src="{% cachebuster img.url %}" width="{{ img.width }}" height="{{ img.height }}" title="{{ bi.descr }}" alt="LEGO Building Instructions for {{ set }} - {{ bi.descr }}">
15 <br><span class="" title="{{ bi.descr }}">{{ bi.descr }}</span>
16 {% if bi.is_alt %}

/home/nathan/rb/site/lego/templates/sets/includes/render_set_bi_list.html

SELECT "lego_files_s3file"."id",
       "lego_files_s3file"."file_size",
       "lego_files_s3file"."last_modified",
       "lego_files_s3file"."aws_mi_file",
       "lego_files_s3file"."linode_si_file",
       "lego_files_s3file"."linode_mi_file",
       "lego_files_s3file"."linode_media_file"
  FROM
"lego_files_s3file"
 WHERE
"lego_files_s3file"."id" = 658631
 LIMIT
21
SELECT ••• FROM "lego_files_s3file" WHERE "lego_files_s3file"."id" = 658631 LIMIT 21
6 similar queries.
0.11

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/models/sets.py in get_download_url(3084)
  if self.file:

9 <div class="display-flex">
10 {% for bi in set.instructions.all %}
11 <div class="xflex-1 xcol-sm-3 mb-10 min-height-250 p-10" style="width:25%">
12 <a href="{{ bi.get_download_url }}" target="_blank">
13 {% thumbs bi.get_preview_img settings.THUMBS_OPTIONS_SET_BI_TILE as img %}
14 <img class="img-responsive" {% if not part.no_lazy %}src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-{% endif %}src="{% cachebuster img.url %}" width="{{ img.width }}" height="{{ img.height }}" title="{{ bi.descr }}" alt="LEGO Building Instructions for {{ set }} - {{ bi.descr }}">
15 <br><span class="" title="{{ bi.descr }}">{{ bi.descr }}</span>
16 {% if bi.is_alt %}

/home/nathan/rb/site/lego/templates/sets/includes/render_set_bi_list.html

SELECT "lego_files_s3file"."id",
       "lego_files_s3file"."file_size",
       "lego_files_s3file"."last_modified",
       "lego_files_s3file"."aws_mi_file",
       "lego_files_s3file"."linode_si_file",
       "lego_files_s3file"."linode_mi_file",
       "lego_files_s3file"."linode_media_file"
  FROM
"lego_files_s3file"
 WHERE
"lego_files_s3file"."id" = 658626
 LIMIT
21
SELECT ••• FROM "lego_files_s3file" WHERE "lego_files_s3file"."id" = 658626 LIMIT 21
6 similar queries.
0.10

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/models/sets.py in get_download_url(3084)
  if self.file:

9 <div class="display-flex">
10 {% for bi in set.instructions.all %}
11 <div class="xflex-1 xcol-sm-3 mb-10 min-height-250 p-10" style="width:25%">
12 <a href="{{ bi.get_download_url }}" target="_blank">
13 {% thumbs bi.get_preview_img settings.THUMBS_OPTIONS_SET_BI_TILE as img %}
14 <img class="img-responsive" {% if not part.no_lazy %}src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-{% endif %}src="{% cachebuster img.url %}" width="{{ img.width }}" height="{{ img.height }}" title="{{ bi.descr }}" alt="LEGO Building Instructions for {{ set }} - {{ bi.descr }}">
15 <br><span class="" title="{{ bi.descr }}">{{ bi.descr }}</span>
16 {% if bi.is_alt %}

/home/nathan/rb/site/lego/templates/sets/includes/render_set_bi_list.html

SELECT "lego_files_s3file"."id",
       "lego_files_s3file"."file_size",
       "lego_files_s3file"."last_modified",
       "lego_files_s3file"."aws_mi_file",
       "lego_files_s3file"."linode_si_file",
       "lego_files_s3file"."linode_mi_file",
       "lego_files_s3file"."linode_media_file"
  FROM
"lego_files_s3file"
 WHERE
"lego_files_s3file"."id" = 658629
 LIMIT
21
SELECT ••• FROM "lego_files_s3file" WHERE "lego_files_s3file"."id" = 658629 LIMIT 21
6 similar queries.
0.09

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/models/sets.py in get_download_url(3084)
  if self.file:

9 <div class="display-flex">
10 {% for bi in set.instructions.all %}
11 <div class="xflex-1 xcol-sm-3 mb-10 min-height-250 p-10" style="width:25%">
12 <a href="{{ bi.get_download_url }}" target="_blank">
13 {% thumbs bi.get_preview_img settings.THUMBS_OPTIONS_SET_BI_TILE as img %}
14 <img class="img-responsive" {% if not part.no_lazy %}src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-{% endif %}src="{% cachebuster img.url %}" width="{{ img.width }}" height="{{ img.height }}" title="{{ bi.descr }}" alt="LEGO Building Instructions for {{ set }} - {{ bi.descr }}">
15 <br><span class="" title="{{ bi.descr }}">{{ bi.descr }}</span>
16 {% if bi.is_alt %}

/home/nathan/rb/site/lego/templates/sets/includes/render_set_bi_list.html

SELECT (width*height) AS "area",
       "ads_banner"."id",
       "ads_banner"."width",
       "ads_banner"."height",
       "ads_banner"."start_date",
       "ads_banner"."end_date",
       "ads_banner"."country_code",
       "ads_banner"."html"
  FROM
"ads_banner"
 WHERE
("ads_banner"."start_date" < '2026-01-22T06:23:06.434704+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-01-22T06:23:06.434834+00:00'::timestamptz OR "ads_banner"."end_date" IS NULL) AND "ads_banner"."height" <= 350 AND "ads_banner"."start_date" < '2026-01-22T06:23:06.434676+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" IS NULL OR "ads_banner"."end_date" > '2026-01-22T06:23:06.435045+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US')
SELECT ••• FROM "ads_banner" WHERE ("ads_banner"."start_date" < '2026-01-22T06:23:06.434704+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-01-22T06:23:06.434834+00:00'::timestamptz OR "ads_banner"."end_date" IS NULL) AND "ads_banner"."height" <= 350 AND "ads_banner"."start_date" < '2026-01-22T06:23:06.434676+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" IS NULL OR "ads_banner"."end_date" > '2026-01-22T06:23:06.435045+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US')
3 similar queries.
2.06

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./ads/templatetags/ads/drawing.py in render_banner(291)
  if not banners:

192 {% endcache %}
193
194 {# cant include banner in cache as it's region specific #}
195 {% render_banner 262 350 0 %}
196
197 {% cache cache_timeout 'set_sidebar_top_other_bit' user.is_authenticated set.id %}
198 {% if request.user.is_authenticated and not set.is_pending %}
199 {% if not set.is_figure %}

/home/nathan/rb/site/lego/templates/sets/includes/render_set_sidebar_top.html

SELECT (width*height) AS "area",
       "ads_banner"."id",
       "ads_banner"."width",
       "ads_banner"."height",
       "ads_banner"."start_date",
       "ads_banner"."end_date",
       "ads_banner"."country_code",
       "ads_banner"."html"
  FROM
"ads_banner"
 WHERE
("ads_banner"."start_date" < '2026-01-22T06:23:06.434704+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-01-22T06:23:06.434834+00:00'::timestamptz OR "ads_banner"."end_date" IS NULL) AND "ads_banner"."height" <= 350 AND "ads_banner"."start_date" < '2026-01-22T06:23:06.434676+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" IS NULL OR "ads_banner"."end_date" > '2026-01-22T06:23:06.435045+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US')
 ORDER BY
1 DESC, RANDOM() ASC
 LIMIT
1
SELECT ••• FROM "ads_banner" WHERE ("ads_banner"."start_date" < '2026-01-22T06:23:06.434704+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-01-22T06:23:06.434834+00:00'::timestamptz OR "ads_banner"."end_date" IS NULL) AND "ads_banner"."height" <= 350 AND "ads_banner"."start_date" < '2026-01-22T06:23:06.434676+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" IS NULL OR "ads_banner"."end_date" > '2026-01-22T06:23:06.435045+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US') ORDER BY 1 DESC, RANDOM() ASC LIMIT 1
3 similar queries.
1.90

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./ads/templatetags/ads/drawing.py in render_banner(298)
  banner = banners.order_by('-area', '?')[0]

192 {% endcache %}
193
194 {# cant include banner in cache as it's region specific #}
195 {% render_banner 262 350 0 %}
196
197 {% cache cache_timeout 'set_sidebar_top_other_bit' user.is_authenticated set.id %}
198 {% if request.user.is_authenticated and not set.is_pending %}
199 {% if not set.is_figure %}

/home/nathan/rb/site/lego/templates/sets/includes/render_set_sidebar_top.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "lego_moc"."baseset_ptr_id",
       "lego_moc"."designer_id",
       "lego_moc"."detail_url",
       "lego_moc"."gallery_url",
       "lego_moc"."bi_url",
       "lego_moc"."cad_url",
       "lego_moc"."video",
       "lego_moc"."bi_type",
       "lego_moc"."is_for_sale",
       "lego_moc"."is_hosted",
       "lego_moc"."cost",
       "lego_moc"."currency_id",
       "lego_moc"."parent_set_1_id",
       "lego_moc"."parent_set_2_id",
       "lego_moc"."parent_set_3_id",
       "lego_moc"."parent_set_4_id",
       "lego_moc"."parent_set_5_id",
       "lego_moc"."parent_inv_1_id",
       "lego_moc"."parent_inv_2_id",
       "lego_moc"."parent_inv_3_id",
       "lego_moc"."parent_inv_4_id",
       "lego_moc"."parent_inv_5_id",
       "lego_moc"."parent_type",
       "lego_moc"."is_allowed_premium",
       "lego_moc"."is_locked",
       "lego_moc"."last_social_post",
       "lego_moc"."is_review_requested"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
"lego_moc"."baseset_ptr_id" = 123652
 LIMIT
21
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE "lego_moc"."baseset_ptr_id" = 123652 LIMIT 21
10 similar queries.
0.29

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(18)
  return render_to_string('sets/render_set_related.html',

/home/nathan/rb/site/./lego/models/sets.py in get_absolute_url(615)
  return self.get_moc().get_absolute_url()

/home/nathan/rb/site/./lego/models/sets.py in get_moc(830)
  elif hasattr(self, 'moc'):

2
3 <div class="mb-20">
4 <div class="text-center">
5 <a href="{{ set.get_absolute_url }}">
6 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=settings.THUMBS_OPTIONS_MOC_TILE %}
7 </a>
8 </div>
9 <h4 class="trunc mb-0" title="{{ set.name }}"><a href="{{ set.get_absolute_url }}">{{ set.name }}</a></h4>

/home/nathan/rb/site/lego/templates/sets/render_set_related.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 614173
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 614173 LIMIT 21
60 similar queries.
0.17

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(18)
  return render_to_string('sets/render_set_related.html',

/home/nathan/rb/site/./lego/models/sets.py in get_absolute_url(615)
  return self.get_moc().get_absolute_url()

/home/nathan/rb/site/./lego/models/mocs.py in get_absolute_url(765)
  url = "/mocs/{0}/{1}/{2}/".format(self.set_num, parse.quote(self.designer.username, safe=''), slug)

2
3 <div class="mb-20">
4 <div class="text-center">
5 <a href="{{ set.get_absolute_url }}">
6 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=settings.THUMBS_OPTIONS_MOC_TILE %}
7 </a>
8 </div>
9 <h4 class="trunc mb-0" title="{{ set.name }}"><a href="{{ set.get_absolute_url }}">{{ set.name }}</a></h4>

/home/nathan/rb/site/lego/templates/sets/render_set_related.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "lego_moc"."baseset_ptr_id",
       "lego_moc"."designer_id",
       "lego_moc"."detail_url",
       "lego_moc"."gallery_url",
       "lego_moc"."bi_url",
       "lego_moc"."cad_url",
       "lego_moc"."video",
       "lego_moc"."bi_type",
       "lego_moc"."is_for_sale",
       "lego_moc"."is_hosted",
       "lego_moc"."cost",
       "lego_moc"."currency_id",
       "lego_moc"."parent_set_1_id",
       "lego_moc"."parent_set_2_id",
       "lego_moc"."parent_set_3_id",
       "lego_moc"."parent_set_4_id",
       "lego_moc"."parent_set_5_id",
       "lego_moc"."parent_inv_1_id",
       "lego_moc"."parent_inv_2_id",
       "lego_moc"."parent_inv_3_id",
       "lego_moc"."parent_inv_4_id",
       "lego_moc"."parent_inv_5_id",
       "lego_moc"."parent_type",
       "lego_moc"."is_allowed_premium",
       "lego_moc"."is_locked",
       "lego_moc"."last_social_post",
       "lego_moc"."is_review_requested"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
"lego_moc"."baseset_ptr_id" = 243973
 LIMIT
21
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE "lego_moc"."baseset_ptr_id" = 243973 LIMIT 21
10 similar queries.
0.29

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(18)
  return render_to_string('sets/render_set_related.html',

/home/nathan/rb/site/./lego/models/sets.py in get_absolute_url(615)
  return self.get_moc().get_absolute_url()

/home/nathan/rb/site/./lego/models/sets.py in get_moc(830)
  elif hasattr(self, 'moc'):

2
3 <div class="mb-20">
4 <div class="text-center">
5 <a href="{{ set.get_absolute_url }}">
6 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=settings.THUMBS_OPTIONS_MOC_TILE %}
7 </a>
8 </div>
9 <h4 class="trunc mb-0" title="{{ set.name }}"><a href="{{ set.get_absolute_url }}">{{ set.name }}</a></h4>

/home/nathan/rb/site/lego/templates/sets/render_set_related.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 681185
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 681185 LIMIT 21
60 similar queries.
0.26

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(18)
  return render_to_string('sets/render_set_related.html',

/home/nathan/rb/site/./lego/models/sets.py in get_absolute_url(615)
  return self.get_moc().get_absolute_url()

/home/nathan/rb/site/./lego/models/mocs.py in get_absolute_url(765)
  url = "/mocs/{0}/{1}/{2}/".format(self.set_num, parse.quote(self.designer.username, safe=''), slug)

2
3 <div class="mb-20">
4 <div class="text-center">
5 <a href="{{ set.get_absolute_url }}">
6 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=settings.THUMBS_OPTIONS_MOC_TILE %}
7 </a>
8 </div>
9 <h4 class="trunc mb-0" title="{{ set.name }}"><a href="{{ set.get_absolute_url }}">{{ set.name }}</a></h4>

/home/nathan/rb/site/lego/templates/sets/render_set_related.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "lego_moc"."baseset_ptr_id",
       "lego_moc"."designer_id",
       "lego_moc"."detail_url",
       "lego_moc"."gallery_url",
       "lego_moc"."bi_url",
       "lego_moc"."cad_url",
       "lego_moc"."video",
       "lego_moc"."bi_type",
       "lego_moc"."is_for_sale",
       "lego_moc"."is_hosted",
       "lego_moc"."cost",
       "lego_moc"."currency_id",
       "lego_moc"."parent_set_1_id",
       "lego_moc"."parent_set_2_id",
       "lego_moc"."parent_set_3_id",
       "lego_moc"."parent_set_4_id",
       "lego_moc"."parent_set_5_id",
       "lego_moc"."parent_inv_1_id",
       "lego_moc"."parent_inv_2_id",
       "lego_moc"."parent_inv_3_id",
       "lego_moc"."parent_inv_4_id",
       "lego_moc"."parent_inv_5_id",
       "lego_moc"."parent_type",
       "lego_moc"."is_allowed_premium",
       "lego_moc"."is_locked",
       "lego_moc"."last_social_post",
       "lego_moc"."is_review_requested"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
"lego_moc"."baseset_ptr_id" = 100965
 LIMIT
21
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE "lego_moc"."baseset_ptr_id" = 100965 LIMIT 21
10 similar queries.
0.26

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(18)
  return render_to_string('sets/render_set_related.html',

/home/nathan/rb/site/./lego/models/sets.py in get_absolute_url(615)
  return self.get_moc().get_absolute_url()

/home/nathan/rb/site/./lego/models/sets.py in get_moc(830)
  elif hasattr(self, 'moc'):

2
3 <div class="mb-20">
4 <div class="text-center">
5 <a href="{{ set.get_absolute_url }}">
6 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=settings.THUMBS_OPTIONS_MOC_TILE %}
7 </a>
8 </div>
9 <h4 class="trunc mb-0" title="{{ set.name }}"><a href="{{ set.get_absolute_url }}">{{ set.name }}</a></h4>

/home/nathan/rb/site/lego/templates/sets/render_set_related.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 458187
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 458187 LIMIT 21
60 similar queries.
0.14

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(18)
  return render_to_string('sets/render_set_related.html',

/home/nathan/rb/site/./lego/models/sets.py in get_absolute_url(615)
  return self.get_moc().get_absolute_url()

/home/nathan/rb/site/./lego/models/mocs.py in get_absolute_url(765)
  url = "/mocs/{0}/{1}/{2}/".format(self.set_num, parse.quote(self.designer.username, safe=''), slug)

2
3 <div class="mb-20">
4 <div class="text-center">
5 <a href="{{ set.get_absolute_url }}">
6 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=settings.THUMBS_OPTIONS_MOC_TILE %}
7 </a>
8 </div>
9 <h4 class="trunc mb-0" title="{{ set.name }}"><a href="{{ set.get_absolute_url }}">{{ set.name }}</a></h4>

/home/nathan/rb/site/lego/templates/sets/render_set_related.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "lego_moc"."baseset_ptr_id",
       "lego_moc"."designer_id",
       "lego_moc"."detail_url",
       "lego_moc"."gallery_url",
       "lego_moc"."bi_url",
       "lego_moc"."cad_url",
       "lego_moc"."video",
       "lego_moc"."bi_type",
       "lego_moc"."is_for_sale",
       "lego_moc"."is_hosted",
       "lego_moc"."cost",
       "lego_moc"."currency_id",
       "lego_moc"."parent_set_1_id",
       "lego_moc"."parent_set_2_id",
       "lego_moc"."parent_set_3_id",
       "lego_moc"."parent_set_4_id",
       "lego_moc"."parent_set_5_id",
       "lego_moc"."parent_inv_1_id",
       "lego_moc"."parent_inv_2_id",
       "lego_moc"."parent_inv_3_id",
       "lego_moc"."parent_inv_4_id",
       "lego_moc"."parent_inv_5_id",
       "lego_moc"."parent_type",
       "lego_moc"."is_allowed_premium",
       "lego_moc"."is_locked",
       "lego_moc"."last_social_post",
       "lego_moc"."is_review_requested"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
"lego_moc"."baseset_ptr_id" = 230599
 LIMIT
21
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE "lego_moc"."baseset_ptr_id" = 230599 LIMIT 21
10 similar queries.
0.21

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(18)
  return render_to_string('sets/render_set_related.html',

/home/nathan/rb/site/./lego/models/sets.py in get_absolute_url(615)
  return self.get_moc().get_absolute_url()

/home/nathan/rb/site/./lego/models/sets.py in get_moc(830)
  elif hasattr(self, 'moc'):

2
3 <div class="mb-20">
4 <div class="text-center">
5 <a href="{{ set.get_absolute_url }}">
6 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=settings.THUMBS_OPTIONS_MOC_TILE %}
7 </a>
8 </div>
9 <h4 class="trunc mb-0" title="{{ set.name }}"><a href="{{ set.get_absolute_url }}">{{ set.name }}</a></h4>

/home/nathan/rb/site/lego/templates/sets/render_set_related.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 562849
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 562849 LIMIT 21
60 similar queries.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(18)
  return render_to_string('sets/render_set_related.html',

/home/nathan/rb/site/./lego/models/sets.py in get_absolute_url(615)
  return self.get_moc().get_absolute_url()

/home/nathan/rb/site/./lego/models/mocs.py in get_absolute_url(765)
  url = "/mocs/{0}/{1}/{2}/".format(self.set_num, parse.quote(self.designer.username, safe=''), slug)

2
3 <div class="mb-20">
4 <div class="text-center">
5 <a href="{{ set.get_absolute_url }}">
6 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=settings.THUMBS_OPTIONS_MOC_TILE %}
7 </a>
8 </div>
9 <h4 class="trunc mb-0" title="{{ set.name }}"><a href="{{ set.get_absolute_url }}">{{ set.name }}</a></h4>

/home/nathan/rb/site/lego/templates/sets/render_set_related.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "lego_moc"."baseset_ptr_id",
       "lego_moc"."designer_id",
       "lego_moc"."detail_url",
       "lego_moc"."gallery_url",
       "lego_moc"."bi_url",
       "lego_moc"."cad_url",
       "lego_moc"."video",
       "lego_moc"."bi_type",
       "lego_moc"."is_for_sale",
       "lego_moc"."is_hosted",
       "lego_moc"."cost",
       "lego_moc"."currency_id",
       "lego_moc"."parent_set_1_id",
       "lego_moc"."parent_set_2_id",
       "lego_moc"."parent_set_3_id",
       "lego_moc"."parent_set_4_id",
       "lego_moc"."parent_set_5_id",
       "lego_moc"."parent_inv_1_id",
       "lego_moc"."parent_inv_2_id",
       "lego_moc"."parent_inv_3_id",
       "lego_moc"."parent_inv_4_id",
       "lego_moc"."parent_inv_5_id",
       "lego_moc"."parent_type",
       "lego_moc"."is_allowed_premium",
       "lego_moc"."is_locked",
       "lego_moc"."last_social_post",
       "lego_moc"."is_review_requested"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
"lego_moc"."baseset_ptr_id" = 267310
 LIMIT
21
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE "lego_moc"."baseset_ptr_id" = 267310 LIMIT 21
10 similar queries.
0.19

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(18)
  return render_to_string('sets/render_set_related.html',

/home/nathan/rb/site/./lego/models/sets.py in get_absolute_url(615)
  return self.get_moc().get_absolute_url()

/home/nathan/rb/site/./lego/models/sets.py in get_moc(830)
  elif hasattr(self, 'moc'):

2
3 <div class="mb-20">
4 <div class="text-center">
5 <a href="{{ set.get_absolute_url }}">
6 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=settings.THUMBS_OPTIONS_MOC_TILE %}
7 </a>
8 </div>
9 <h4 class="trunc mb-0" title="{{ set.name }}"><a href="{{ set.get_absolute_url }}">{{ set.name }}</a></h4>

/home/nathan/rb/site/lego/templates/sets/render_set_related.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 402326
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 402326 LIMIT 21
60 similar queries.
0.13

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(18)
  return render_to_string('sets/render_set_related.html',

/home/nathan/rb/site/./lego/models/sets.py in get_absolute_url(615)
  return self.get_moc().get_absolute_url()

/home/nathan/rb/site/./lego/models/mocs.py in get_absolute_url(765)
  url = "/mocs/{0}/{1}/{2}/".format(self.set_num, parse.quote(self.designer.username, safe=''), slug)

2
3 <div class="mb-20">
4 <div class="text-center">
5 <a href="{{ set.get_absolute_url }}">
6 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=settings.THUMBS_OPTIONS_MOC_TILE %}
7 </a>
8 </div>
9 <h4 class="trunc mb-0" title="{{ set.name }}"><a href="{{ set.get_absolute_url }}">{{ set.name }}</a></h4>

/home/nathan/rb/site/lego/templates/sets/render_set_related.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "lego_moc"."baseset_ptr_id",
       "lego_moc"."designer_id",
       "lego_moc"."detail_url",
       "lego_moc"."gallery_url",
       "lego_moc"."bi_url",
       "lego_moc"."cad_url",
       "lego_moc"."video",
       "lego_moc"."bi_type",
       "lego_moc"."is_for_sale",
       "lego_moc"."is_hosted",
       "lego_moc"."cost",
       "lego_moc"."currency_id",
       "lego_moc"."parent_set_1_id",
       "lego_moc"."parent_set_2_id",
       "lego_moc"."parent_set_3_id",
       "lego_moc"."parent_set_4_id",
       "lego_moc"."parent_set_5_id",
       "lego_moc"."parent_inv_1_id",
       "lego_moc"."parent_inv_2_id",
       "lego_moc"."parent_inv_3_id",
       "lego_moc"."parent_inv_4_id",
       "lego_moc"."parent_inv_5_id",
       "lego_moc"."parent_type",
       "lego_moc"."is_allowed_premium",
       "lego_moc"."is_locked",
       "lego_moc"."last_social_post",
       "lego_moc"."is_review_requested"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
"lego_moc"."baseset_ptr_id" = 287600
 LIMIT
21
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE "lego_moc"."baseset_ptr_id" = 287600 LIMIT 21
10 similar queries.
0.21

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(18)
  return render_to_string('sets/render_set_related.html',

/home/nathan/rb/site/./lego/models/sets.py in get_absolute_url(615)
  return self.get_moc().get_absolute_url()

/home/nathan/rb/site/./lego/models/sets.py in get_moc(830)
  elif hasattr(self, 'moc'):

2
3 <div class="mb-20">
4 <div class="text-center">
5 <a href="{{ set.get_absolute_url }}">
6 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=settings.THUMBS_OPTIONS_MOC_TILE %}
7 </a>
8 </div>
9 <h4 class="trunc mb-0" title="{{ set.name }}"><a href="{{ set.get_absolute_url }}">{{ set.name }}</a></h4>

/home/nathan/rb/site/lego/templates/sets/render_set_related.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1617506
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1617506 LIMIT 21
60 similar queries.
0.17

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(18)
  return render_to_string('sets/render_set_related.html',

/home/nathan/rb/site/./lego/models/sets.py in get_absolute_url(615)
  return self.get_moc().get_absolute_url()

/home/nathan/rb/site/./lego/models/mocs.py in get_absolute_url(765)
  url = "/mocs/{0}/{1}/{2}/".format(self.set_num, parse.quote(self.designer.username, safe=''), slug)

2
3 <div class="mb-20">
4 <div class="text-center">
5 <a href="{{ set.get_absolute_url }}">
6 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=settings.THUMBS_OPTIONS_MOC_TILE %}
7 </a>
8 </div>
9 <h4 class="trunc mb-0" title="{{ set.name }}"><a href="{{ set.get_absolute_url }}">{{ set.name }}</a></h4>

/home/nathan/rb/site/lego/templates/sets/render_set_related.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "lego_moc"."baseset_ptr_id",
       "lego_moc"."designer_id",
       "lego_moc"."detail_url",
       "lego_moc"."gallery_url",
       "lego_moc"."bi_url",
       "lego_moc"."cad_url",
       "lego_moc"."video",
       "lego_moc"."bi_type",
       "lego_moc"."is_for_sale",
       "lego_moc"."is_hosted",
       "lego_moc"."cost",
       "lego_moc"."currency_id",
       "lego_moc"."parent_set_1_id",
       "lego_moc"."parent_set_2_id",
       "lego_moc"."parent_set_3_id",
       "lego_moc"."parent_set_4_id",
       "lego_moc"."parent_set_5_id",
       "lego_moc"."parent_inv_1_id",
       "lego_moc"."parent_inv_2_id",
       "lego_moc"."parent_inv_3_id",
       "lego_moc"."parent_inv_4_id",
       "lego_moc"."parent_inv_5_id",
       "lego_moc"."parent_type",
       "lego_moc"."is_allowed_premium",
       "lego_moc"."is_locked",
       "lego_moc"."last_social_post",
       "lego_moc"."is_review_requested"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
"lego_moc"."baseset_ptr_id" = 292409
 LIMIT
21
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE "lego_moc"."baseset_ptr_id" = 292409 LIMIT 21
10 similar queries.
0.32

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(18)
  return render_to_string('sets/render_set_related.html',

/home/nathan/rb/site/./lego/models/sets.py in get_absolute_url(615)
  return self.get_moc().get_absolute_url()

/home/nathan/rb/site/./lego/models/sets.py in get_moc(830)
  elif hasattr(self, 'moc'):

2
3 <div class="mb-20">
4 <div class="text-center">
5 <a href="{{ set.get_absolute_url }}">
6 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=settings.THUMBS_OPTIONS_MOC_TILE %}
7 </a>
8 </div>
9 <h4 class="trunc mb-0" title="{{ set.name }}"><a href="{{ set.get_absolute_url }}">{{ set.name }}</a></h4>

/home/nathan/rb/site/lego/templates/sets/render_set_related.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 355708
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 355708 LIMIT 21
60 similar queries.
0.16

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(18)
  return render_to_string('sets/render_set_related.html',

/home/nathan/rb/site/./lego/models/sets.py in get_absolute_url(615)
  return self.get_moc().get_absolute_url()

/home/nathan/rb/site/./lego/models/mocs.py in get_absolute_url(765)
  url = "/mocs/{0}/{1}/{2}/".format(self.set_num, parse.quote(self.designer.username, safe=''), slug)

2
3 <div class="mb-20">
4 <div class="text-center">
5 <a href="{{ set.get_absolute_url }}">
6 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=settings.THUMBS_OPTIONS_MOC_TILE %}
7 </a>
8 </div>
9 <h4 class="trunc mb-0" title="{{ set.name }}"><a href="{{ set.get_absolute_url }}">{{ set.name }}</a></h4>

/home/nathan/rb/site/lego/templates/sets/render_set_related.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "lego_moc"."baseset_ptr_id",
       "lego_moc"."designer_id",
       "lego_moc"."detail_url",
       "lego_moc"."gallery_url",
       "lego_moc"."bi_url",
       "lego_moc"."cad_url",
       "lego_moc"."video",
       "lego_moc"."bi_type",
       "lego_moc"."is_for_sale",
       "lego_moc"."is_hosted",
       "lego_moc"."cost",
       "lego_moc"."currency_id",
       "lego_moc"."parent_set_1_id",
       "lego_moc"."parent_set_2_id",
       "lego_moc"."parent_set_3_id",
       "lego_moc"."parent_set_4_id",
       "lego_moc"."parent_set_5_id",
       "lego_moc"."parent_inv_1_id",
       "lego_moc"."parent_inv_2_id",
       "lego_moc"."parent_inv_3_id",
       "lego_moc"."parent_inv_4_id",
       "lego_moc"."parent_inv_5_id",
       "lego_moc"."parent_type",
       "lego_moc"."is_allowed_premium",
       "lego_moc"."is_locked",
       "lego_moc"."last_social_post",
       "lego_moc"."is_review_requested"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
"lego_moc"."baseset_ptr_id" = 259322
 LIMIT
21
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE "lego_moc"."baseset_ptr_id" = 259322 LIMIT 21
10 similar queries.
0.36

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(18)
  return render_to_string('sets/render_set_related.html',

/home/nathan/rb/site/./lego/models/sets.py in get_absolute_url(615)
  return self.get_moc().get_absolute_url()

/home/nathan/rb/site/./lego/models/sets.py in get_moc(830)
  elif hasattr(self, 'moc'):

2
3 <div class="mb-20">
4 <div class="text-center">
5 <a href="{{ set.get_absolute_url }}">
6 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=settings.THUMBS_OPTIONS_MOC_TILE %}
7 </a>
8 </div>
9 <h4 class="trunc mb-0" title="{{ set.name }}"><a href="{{ set.get_absolute_url }}">{{ set.name }}</a></h4>

/home/nathan/rb/site/lego/templates/sets/render_set_related.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 1268483
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 1268483 LIMIT 21
60 similar queries.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(18)
  return render_to_string('sets/render_set_related.html',

/home/nathan/rb/site/./lego/models/sets.py in get_absolute_url(615)
  return self.get_moc().get_absolute_url()

/home/nathan/rb/site/./lego/models/mocs.py in get_absolute_url(765)
  url = "/mocs/{0}/{1}/{2}/".format(self.set_num, parse.quote(self.designer.username, safe=''), slug)

2
3 <div class="mb-20">
4 <div class="text-center">
5 <a href="{{ set.get_absolute_url }}">
6 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=settings.THUMBS_OPTIONS_MOC_TILE %}
7 </a>
8 </div>
9 <h4 class="trunc mb-0" title="{{ set.name }}"><a href="{{ set.get_absolute_url }}">{{ set.name }}</a></h4>

/home/nathan/rb/site/lego/templates/sets/render_set_related.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "lego_moc"."baseset_ptr_id",
       "lego_moc"."designer_id",
       "lego_moc"."detail_url",
       "lego_moc"."gallery_url",
       "lego_moc"."bi_url",
       "lego_moc"."cad_url",
       "lego_moc"."video",
       "lego_moc"."bi_type",
       "lego_moc"."is_for_sale",
       "lego_moc"."is_hosted",
       "lego_moc"."cost",
       "lego_moc"."currency_id",
       "lego_moc"."parent_set_1_id",
       "lego_moc"."parent_set_2_id",
       "lego_moc"."parent_set_3_id",
       "lego_moc"."parent_set_4_id",
       "lego_moc"."parent_set_5_id",
       "lego_moc"."parent_inv_1_id",
       "lego_moc"."parent_inv_2_id",
       "lego_moc"."parent_inv_3_id",
       "lego_moc"."parent_inv_4_id",
       "lego_moc"."parent_inv_5_id",
       "lego_moc"."parent_type",
       "lego_moc"."is_allowed_premium",
       "lego_moc"."is_locked",
       "lego_moc"."last_social_post",
       "lego_moc"."is_review_requested"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
"lego_moc"."baseset_ptr_id" = 289244
 LIMIT
21
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE "lego_moc"."baseset_ptr_id" = 289244 LIMIT 21
10 similar queries.
0.22

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(18)
  return render_to_string('sets/render_set_related.html',

/home/nathan/rb/site/./lego/models/sets.py in get_absolute_url(615)
  return self.get_moc().get_absolute_url()

/home/nathan/rb/site/./lego/models/sets.py in get_moc(830)
  elif hasattr(self, 'moc'):

2
3 <div class="mb-20">
4 <div class="text-center">
5 <a href="{{ set.get_absolute_url }}">
6 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=settings.THUMBS_OPTIONS_MOC_TILE %}
7 </a>
8 </div>
9 <h4 class="trunc mb-0" title="{{ set.name }}"><a href="{{ set.get_absolute_url }}">{{ set.name }}</a></h4>

/home/nathan/rb/site/lego/templates/sets/render_set_related.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 554089
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 554089 LIMIT 21
60 similar queries.
0.14

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(18)
  return render_to_string('sets/render_set_related.html',

/home/nathan/rb/site/./lego/models/sets.py in get_absolute_url(615)
  return self.get_moc().get_absolute_url()

/home/nathan/rb/site/./lego/models/mocs.py in get_absolute_url(765)
  url = "/mocs/{0}/{1}/{2}/".format(self.set_num, parse.quote(self.designer.username, safe=''), slug)

2
3 <div class="mb-20">
4 <div class="text-center">
5 <a href="{{ set.get_absolute_url }}">
6 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=settings.THUMBS_OPTIONS_MOC_TILE %}
7 </a>
8 </div>
9 <h4 class="trunc mb-0" title="{{ set.name }}"><a href="{{ set.get_absolute_url }}">{{ set.name }}</a></h4>

/home/nathan/rb/site/lego/templates/sets/render_set_related.html

SELECT "lego_baseset"."id",
       "lego_baseset"."set_num",
       "lego_baseset"."name",
       "lego_baseset"."year",
       "lego_baseset"."theme_id",
       "lego_baseset"."set_type",
       "lego_baseset"."num_parts",
       "lego_baseset"."default_inventory_id",
       "lego_baseset"."is_active",
       "lego_baseset"."is_accessory",
       "lego_baseset"."added_dt",
       "lego_baseset"."added_by_id",
       "lego_baseset"."last_modified_dt",
       "lego_baseset"."last_modified_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "lego_moc"."baseset_ptr_id",
       "lego_moc"."designer_id",
       "lego_moc"."detail_url",
       "lego_moc"."gallery_url",
       "lego_moc"."bi_url",
       "lego_moc"."cad_url",
       "lego_moc"."video",
       "lego_moc"."bi_type",
       "lego_moc"."is_for_sale",
       "lego_moc"."is_hosted",
       "lego_moc"."cost",
       "lego_moc"."currency_id",
       "lego_moc"."parent_set_1_id",
       "lego_moc"."parent_set_2_id",
       "lego_moc"."parent_set_3_id",
       "lego_moc"."parent_set_4_id",
       "lego_moc"."parent_set_5_id",
       "lego_moc"."parent_inv_1_id",
       "lego_moc"."parent_inv_2_id",
       "lego_moc"."parent_inv_3_id",
       "lego_moc"."parent_inv_4_id",
       "lego_moc"."parent_inv_5_id",
       "lego_moc"."parent_type",
       "lego_moc"."is_allowed_premium",
       "lego_moc"."is_locked",
       "lego_moc"."last_social_post",
       "lego_moc"."is_review_requested"
  FROM
"lego_moc"
 INNER JOIN
"lego_baseset"
    ON
("lego_moc"."baseset_ptr_id" = "lego_baseset"."id")
 WHERE
"lego_moc"."baseset_ptr_id" = 287293
 LIMIT
21
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") WHERE "lego_moc"."baseset_ptr_id" = 287293 LIMIT 21
10 similar queries.
0.20

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(18)
  return render_to_string('sets/render_set_related.html',

/home/nathan/rb/site/./lego/models/sets.py in get_absolute_url(615)
  return self.get_moc().get_absolute_url()

/home/nathan/rb/site/./lego/models/sets.py in get_moc(830)
  elif hasattr(self, 'moc'):

2
3 <div class="mb-20">
4 <div class="text-center">
5 <a href="{{ set.get_absolute_url }}">
6 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=settings.THUMBS_OPTIONS_MOC_TILE %}
7 </a>
8 </div>
9 <h4 class="trunc mb-0" title="{{ set.name }}"><a href="{{ set.get_absolute_url }}">{{ set.name }}</a></h4>

/home/nathan/rb/site/lego/templates/sets/render_set_related.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 834806
 LIMIT
21
SELECT ••• FROM "lego_designer" INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") WHERE "lego_designer"."user_ptr_id" = 834806 LIMIT 21
60 similar queries.
0.15

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_set(18)
  return render_to_string('sets/render_set_related.html',

/home/nathan/rb/site/./lego/models/sets.py in get_absolute_url(615)
  return self.get_moc().get_absolute_url()

/home/nathan/rb/site/./lego/models/mocs.py in get_absolute_url(765)
  url = "/mocs/{0}/{1}/{2}/".format(self.set_num, parse.quote(self.designer.username, safe=''), slug)

2
3 <div class="mb-20">
4 <div class="text-center">
5 <a href="{{ set.get_absolute_url }}">
6 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=settings.THUMBS_OPTIONS_MOC_TILE %}
7 </a>
8 </div>
9 <h4 class="trunc mb-0" title="{{ set.name }}"><a href="{{ set.get_absolute_url }}">{{ set.name }}</a></h4>

/home/nathan/rb/site/lego/templates/sets/render_set_related.html

SELECT (width*height) AS "area",
       "ads_banner"."id",
       "ads_banner"."width",
       "ads_banner"."height",
       "ads_banner"."start_date",
       "ads_banner"."end_date",
       "ads_banner"."country_code",
       "ads_banner"."html"
  FROM
"ads_banner"
 WHERE
("ads_banner"."start_date" < '2026-01-22T06:23:06.471380+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-01-22T06:23:06.471454+00:00'::timestamptz OR "ads_banner"."end_date" IS NULL) AND "ads_banner"."height" <= 350 AND "ads_banner"."start_date" < '2026-01-22T06:23:06.471363+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" IS NULL OR "ads_banner"."end_date" > '2026-01-22T06:23:06.471586+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US')
SELECT ••• FROM "ads_banner" WHERE ("ads_banner"."start_date" < '2026-01-22T06:23:06.471380+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-01-22T06:23:06.471454+00:00'::timestamptz OR "ads_banner"."end_date" IS NULL) AND "ads_banner"."height" <= 350 AND "ads_banner"."start_date" < '2026-01-22T06:23:06.471363+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" IS NULL OR "ads_banner"."end_date" > '2026-01-22T06:23:06.471586+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US')
3 similar queries.
2.97

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./ads/templatetags/ads/drawing.py in render_banner(291)
  if not banners:

20 {% render_set related_set related=True %}
21 {% endfor %}
22 {% render_ad 'med_rect_btf' %}
23 {% render_banner 262 350 %}
24 <a href="{% url 'browse_mocs' %}"><button class="btn btn-default btn-block mt-10">Discover more MOCs!</button></a>
25 </section>
26

/home/nathan/rb/site/lego/templates/sets/includes/render_set_sidebar_bottom.html

SELECT (width*height) AS "area",
       "ads_banner"."id",
       "ads_banner"."width",
       "ads_banner"."height",
       "ads_banner"."start_date",
       "ads_banner"."end_date",
       "ads_banner"."country_code",
       "ads_banner"."html"
  FROM
"ads_banner"
 WHERE
("ads_banner"."start_date" < '2026-01-22T06:23:06.471380+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-01-22T06:23:06.471454+00:00'::timestamptz OR "ads_banner"."end_date" IS NULL) AND "ads_banner"."height" <= 350 AND "ads_banner"."start_date" < '2026-01-22T06:23:06.471363+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" IS NULL OR "ads_banner"."end_date" > '2026-01-22T06:23:06.471586+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US')
 ORDER BY
1 DESC, RANDOM() ASC
 LIMIT
1
SELECT ••• FROM "ads_banner" WHERE ("ads_banner"."start_date" < '2026-01-22T06:23:06.471380+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-01-22T06:23:06.471454+00:00'::timestamptz OR "ads_banner"."end_date" IS NULL) AND "ads_banner"."height" <= 350 AND "ads_banner"."start_date" < '2026-01-22T06:23:06.471363+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" IS NULL OR "ads_banner"."end_date" > '2026-01-22T06:23:06.471586+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US') ORDER BY 1 DESC, RANDOM() ASC LIMIT 1
3 similar queries.
1.86

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/sets.py in find_sets(114)
  return set_details(request, slug1)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/sets.py in set_details(449)
  return render(request, 'sets/set_details.html', context)

/home/nathan/rb/site/./ads/templatetags/ads/drawing.py in render_banner(298)
  banner = banners.order_by('-area', '?')[0]

20 {% render_set related_set related=True %}
21 {% endfor %}
22 {% render_ad 'med_rect_btf' %}
23 {% render_banner 262 350 %}
24 <a href="{% url 'browse_mocs' %}"><button class="btn btn-default btn-block mt-10">Discover more MOCs!</button></a>
25 </section>
26

/home/nathan/rb/site/lego/templates/sets/includes/render_set_sidebar_bottom.html

Log messages

No messages logged.