Controller Statue

MOC-38837 • 2853 parts
MOC-38837 Controller Statue
Buy:
PDF Building Instructions
Cost:
Want to see more MOCS like this? Create an account to find MOCs you can build from the parts you already own

FOLLOWERS

631

LIKES

This model is at a high level of difficulty, the instructions are built layer after layer and can be a condition that some parts are suspended in the air until the next step.
I upload the Studio.io 3D model to help you with the build.
to your account to add or reply to comments.
  • Avatar image for Rebrickable user AresBuilds
    AresBuilds
    Level 14 MOC Designer
    2 years, 10 months ago
    THIS IS SOOOOOOOOOOO COOL!!!!!!!!!!!!!!!!!!!!!!!!!
  • Avatar image for Rebrickable user RPM Technic Creations
    4 years, 5 months ago
    todo completo y con todos los botones y funciones como el original , !sigue así¡ me gustaría seguir viendo obras de arte como esta
  • Avatar image for Rebrickable user Leblair256
    5 years, 4 months ago
    Love it!! What is the size of this build and does it have any moving parts?
  • Avatar image for Rebrickable user SoloEngineer
    6 years, 1 month ago
    Nice Job!  This is my favorite of all your game controllers.

Rebrickable does not sell LEGO Parts.

We provide links to third-party stores that sell LEGO products. If you use these stores, you are not buying from Rebrickable. Click the button below to search the stores.

DJDT

Time

Resource usage

Resource Value
User CPU time 504.211 msec
System CPU time 7.953 msec
Total CPU time 512.164 msec
Elapsed time 550.638 msec
Context switches 248 voluntary, 11 involuntary

Browser timing

Timing attribute Timeline Milliseconds since navigation start (+length)

SQL queries from 1 connection

  • default 31.97 ms (98 queries including 73 similar and 37 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"."active_change_dt",
       "lego_baseset"."active_change_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."primary_moc_image_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",
       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",
       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",
       "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",
       T10."id",
       T10."set_num",
       T10."name",
       T10."year",
       T10."theme_id",
       T10."set_type",
       T10."num_parts",
       T10."default_inventory_id",
       T10."is_active",
       T10."is_accessory",
       T10."added_dt",
       T10."added_by_id",
       T10."last_modified_dt",
       T10."last_modified_by_id",
       T10."active_change_dt",
       T10."active_change_by_id",
       T10."last_checked_for_bi",
       T10."descr",
       T10."primary_photo_id",
       T10."primary_moc_image_id",
       T10."is_gear",
       T10."is_book",
       T10."search_vector",
       T10."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_theme"
    ON
("lego_baseset"."theme_id" = "lego_theme"."id")
  LEFT OUTER JOIN
"lego_theme" T4
    ON
("lego_theme"."parent_id" = T4."id")
  LEFT OUTER JOIN
"lego_theme" T5
    ON
(T4."parent_id" = T5."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_baseset" T10
    ON
("lego_moc"."parent_set_1_id" = T10."id")
  LEFT OUTER JOIN
"lego_setstatstotal"
    ON
("lego_baseset"."id" = "lego_setstatstotal"."set_id")
 WHERE
"lego_baseset"."set_num" = 'MOC-38837'
 LIMIT
21
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") INNER JOIN "lego_theme" ON ("lego_baseset"."theme_id" = "lego_theme"."id") LEFT OUTER JOIN "lego_theme" T4 ON ("lego_theme"."parent_id" = T4."id") LEFT OUTER JOIN "lego_theme" T5 ON (T4."parent_id" = T5."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_baseset" T10 ON ("lego_moc"."parent_set_1_id" = T10."id") LEFT OUTER JOIN "lego_setstatstotal" ON ("lego_baseset"."id" = "lego_setstatstotal"."set_id") WHERE "lego_baseset"."set_num" = 'MOC-38837' LIMIT 21
2.37

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(477)
  moc = Moc.all_objects.select_related('designer', 'stats').get(set_num=set_num)

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 (49160))
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 (49160))
2 similar queries. Duplicated 2 times.
0.33

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(477)
  moc = Moc.all_objects.select_related('designer', 'stats').get(set_num=set_num)

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"."set_id" = 49160 AND "lego_inventory"."version" = 1)
 LIMIT
21
SELECT ••• FROM "lego_inventory" WHERE ("lego_inventory"."set_id" = 49160 AND "lego_inventory"."version" = 1) LIMIT 21
0.12

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(591)
  inventory = get_object_or_404(Inventory.all_objects, set=moc, version=inventory_version)

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" = 'MOC-38837' AND NOT ("lego_changelog"."model" = 'PendingMoc'))
 ORDER BY
"lego_changelog"."timestamp" DESC
SELECT ••• FROM "lego_changelog" WHERE ("lego_changelog"."set_num" = 'MOC-38837' AND NOT ("lego_changelog"."model" = 'PendingMoc')) ORDER BY "lego_changelog"."timestamp" DESC
8.87

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(608)
  changes = moc.get_change_summary()

/home/nathan/rb/site/./lego/models/sets.py in get_change_summary(1169)
  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_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-11-16T01:10:58.188406+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-11-16T01:10:58.188403+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '49160'::jsonb)
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-11-16T01:10:58.188406+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-11-16T01:10:58.188403+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '49160'::jsonb) ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
4 similar queries.
0.50

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(623)
  context['applied_discount'] = DesignerDiscount.get_moc_discount(moc.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(562)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

SELECT "lego_moc100store"."id",
       "lego_moc100store"."moc_id",
       "lego_moc100store"."store_id",
       "lego_moc100store"."last_updated",
       "lego_moc100store"."cost",
       "lego_moc100store"."post_data"
  FROM
"lego_moc100store"
 INNER JOIN
"lego_store"
    ON
("lego_moc100store"."store_id" = "lego_store"."id")
 WHERE
("lego_moc100store"."moc_id" = 49160 AND "lego_store"."country_code" IN ('US'))
SELECT ••• FROM "lego_moc100store" INNER JOIN "lego_store" ON ("lego_moc100store"."store_id" = "lego_store"."id") WHERE ("lego_moc100store"."moc_id" = 49160 AND "lego_store"."country_code" IN ('US'))
0.18

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(713)
  context['moc_100_store'] = Moc100Store.get_best_store_for_moc_user(moc, request.user)

/home/nathan/rb/site/./lego/models/mocs.py in get_best_store_for_moc_user(3888)
  for s in stores:

SELECT COUNT(*) AS "__count"
  FROM
"django_comments"
 WHERE
("django_comments"."content_type_id" = 31 AND NOT "django_comments"."is_removed" AND "django_comments"."object_pk" = '49160')
SELECT ••• FROM "django_comments" WHERE ("django_comments"."content_type_id" = 31 AND NOT "django_comments"."is_removed" AND "django_comments"."object_pk" = '49160')
0.39

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(725)
  context['num_comments'] = Comment.objects.filter(object_pk=moc.id, content_type=ContentType.objects.get_for_model(moc), is_removed=False).count()

SELECT "lego_mocimage"."id",
       "lego_mocimage"."moc_id",
       "lego_mocimage"."is_primary",
       "lego_mocimage"."file_extension"
  FROM
"lego_mocimage"
 WHERE
"lego_mocimage"."id" = 8266
 LIMIT
21
SELECT ••• FROM "lego_mocimage" WHERE "lego_mocimage"."id" = 8266 LIMIT 21
0.11

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./lego/models/sets.py in img_dir(771)
  img = self.primary_moc_image

43 {% endif %}
44 {% endspaceless %}{% endblock meta_og_description %}
45 {% block meta_image %}{% spaceless %}
46 {% if moc.img_dir %}
47 {% thumbs moc.img_dir settings.THUMBS_OPTIONS_MOC_MAIN as img %}{{ img.url }}
48 {% endif %}
49 {% endspaceless %}{% endblock meta_image %}
50

/home/nathan/rb/site/lego/templates/mocs/moc_details.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-11-16T01:10:58.198212+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-11-16T01:10:58.198211+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '49160'::jsonb)
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-11-16T01:10:58.198212+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-11-16T01:10:58.198211+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '49160'::jsonb) ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
4 similar queries.
0.42

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./lego/models/mocs.py in get_discounted_cost(385)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(562)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

81 {% endif %}
82 "offers": {
83 "@type": "Offer",
84 "price": "{{ moc.get_discounted_cost|floatformat:2 }}",
85 "priceCurrency": "{{ moc.currency.code }}",
86 "availability": "OnlineOnly"
87 }
88 }

/home/nathan/rb/site/lego/templates/mocs/moc_details.html

SELECT "geo_currency"."id",
       "geo_currency"."code",
       "geo_currency"."rate"
  FROM
"geo_currency"
 WHERE
"geo_currency"."id" = 52
 LIMIT
21
SELECT ••• FROM "geo_currency" WHERE "geo_currency"."id" = 52 LIMIT 21
0.11

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

82 "offers": {
83 "@type": "Offer",
84 "price": "{{ moc.get_discounted_cost|floatformat:2 }}",
85 "priceCurrency": "{{ moc.currency.code }}",
86 "availability": "OnlineOnly"
87 }
88 }
89 </script>

/home/nathan/rb/site/lego/templates/mocs/moc_details.html

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.14

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./rb/templatetags/rb_geo.py in geo_currency(20)
  geo_data = user.geo.get_user_currency()

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

74 </a>
75 </li>
76 <li>
77 {% geo_currency request.user %}
78 </li>
79 {% comment %}
80 <li class="hidden-xs hidden-sm">
81 <a href={% if request.user.is_authenticated %}"{% url 'user_profile_settings' request.user.get_username %}#personalisation"{% else %}"#" onclick="return false;"{% endif %} title="All date/times are being converted to this timezone">{% get_user_timezone request.user %}</a>

/home/nathan/rb/site/rb/templates/rb/includes/topbar.html

SELECT COUNT(*) AS "__count"
  FROM
"lego_inventory"
 WHERE
("lego_inventory"."is_active" AND "lego_inventory"."set_id" = 49160)
SELECT ••• FROM "lego_inventory" WHERE ("lego_inventory"."is_active" AND "lego_inventory"."set_id" = 49160)
2 similar queries. Duplicated 2 times.
0.11

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

16 <div class="mb-10">
17 <span>{{ moc.set_num }}</span>
18 &bull;
19 <span><a href="#parts_scroll" title="See the parts in this MOC's inventory">{{ moc.num_parts }} parts{% if moc.get_num_inventories > 1 %} <span class="label label-primary">v{{ inventory.version }}</span>{% endif %}</a></span>
20 </div>
21
22 </div>
23

/home/nathan/rb/site/lego/templates/mocs/includes/render_moc_main_top.html

SELECT "lego_mocimage"."id",
       "lego_mocimage"."moc_id",
       "lego_mocimage"."is_primary",
       "lego_mocimage"."file_extension"
  FROM
"lego_mocimage"
 WHERE
"lego_mocimage"."moc_id" = 49160
 ORDER BY
"lego_mocimage"."is_primary" DESC, "lego_mocimage"."id" ASC
SELECT ••• FROM "lego_mocimage" WHERE "lego_mocimage"."moc_id" = 49160 ORDER BY "lego_mocimage"."is_primary" DESC, "lego_mocimage"."id" ASC
2 similar queries. Duplicated 2 times.
0.20

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

25 <div class="alert alert-danger"><h4><i class="fa fa-warning"></i> This MOC is disabled.</h4></div>
26 {% endif %}
27
28 {% if moc.use_fake_image %}
29
30 {% thumbs moc.use_fake_image.img_dir settings.THUMBS_OPTIONS_MOC_TILE as thumb_img %}
31 {% thumbs_encoded moc.use_fake_image.img_dir settings.THUMBS_OPTIONS_MOC_MAIN_PREVIEW as preview_img %}
32 {% thumbs moc.use_fake_image.img_dir settings.THUMBS_OPTIONS_MOC_MAIN get_real_dims=1 as first_image %}

/home/nathan/rb/site/lego/templates/mocs/includes/render_moc_main_top.html

SELECT "lego_mocimage"."id",
       "lego_mocimage"."moc_id",
       "lego_mocimage"."is_primary",
       "lego_mocimage"."file_extension"
  FROM
"lego_mocimage"
 WHERE
"lego_mocimage"."moc_id" = 49160
 ORDER BY
"lego_mocimage"."is_primary" DESC, "lego_mocimage"."id" ASC
SELECT ••• FROM "lego_mocimage" WHERE "lego_mocimage"."moc_id" = 49160 ORDER BY "lego_mocimage"."is_primary" DESC, "lego_mocimage"."id" ASC
2 similar queries. Duplicated 2 times.
0.09

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

81 {% else %}
82
83 {# only loops once, but easy way to grab it #}
84 {% for image in moc.moc_images.all %}
85 {% thumbs image.img_dir settings.THUMBS_OPTIONS_MOC_TILE as thumb_img %}
86 {% thumbs_encoded image.img_dir settings.THUMBS_OPTIONS_MOC_MAIN_PREVIEW as preview_img %}
87 {% thumbs image.img_dir settings.THUMBS_OPTIONS_MOC_MAIN get_real_dims=1 as first_image %}
88 <img class="img-responsive" style="background-image:url('data:image;base64,{{ preview_img }}');background-size:contain;background-repeat:no-repeat"

/home/nathan/rb/site/lego/templates/mocs/includes/render_moc_main_top.html

SELECT COUNT(*) AS "__count"
  FROM
"lego_inventory"
 WHERE
("lego_inventory"."is_active" AND "lego_inventory"."set_id" = 49160)
SELECT ••• FROM "lego_inventory" WHERE ("lego_inventory"."is_active" AND "lego_inventory"."set_id" = 49160)
2 similar queries. Duplicated 2 times.
0.25

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

18 <div class=" mb-30">
19 <span>{{ set.set_num }}</span>
20 &bull;
21 <span><a href="#parts_scroll" title="See the parts in this MOC's inventory">{{ set.num_parts }} parts{% if set.get_num_inventories > 1 %} <span class="label label-primary">v{{ inventory.version }}</span>{% endif %}</a></span>
22 &bull;
23 <span><a href="{% url 'browse_mocs' %}?theme={{ set.theme_id }}" title="Find other MOCs in this theme">{{ set.theme.get_full_name }}</a></span>
24 </div>
25 </div>

/home/nathan/rb/site/lego/templates/mocs/includes/render_moc_main_top_buy.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 '%MOC-38837%')
 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 '%MOC-38837%') ORDER BY "blog_article"."published_date" ASC
0.31

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

24 </div>
25 </div>
26
27 {% with moc.get_set_review as review %}
28 {% if review %}
29 <div class="text-center">
30 <a href="{{ review.get_absolute_url }}"><i class="fa fa-star"></i> See our Review of this MOC</a>
31 </div>

/home/nathan/rb/site/lego/templates/mocs/includes/render_moc_main_top_buy.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" = 366293
 LIMIT
21
SELECT ••• FROM "auth_user" WHERE "auth_user"."id" = 366293 LIMIT 21
3 similar queries. Duplicated 3 times.
0.13

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./lego/models/mocs.py in get_bi_preview_imgs(1591)
  user = User.objects.get(id=self.designer_id)

33 {% endwith %}
34
35 <div class="row row-condensed">
36 {% with moc.get_bi_preview_imgs as preview_imgs %}
37 {% for img in preview_imgs %}
38 <div class="col-condensed {% if preview_imgs|length == 2 %}col-xs-6{% elif preview_imgs|length == 1 %}col-xs-6 col-xs-offset-3{% else %}col-xs-4{% endif %}">
39 <a class="lightbox" href="{% cachebuster img %}" data-plugin-options='{"type":"image", "zoom": {"enabled": "true"}}'>
40 {% thumbs img settings.THUMBS_OPTIONS_MOC_PDF_PREVIEW calc_height=1 as img %}

/home/nathan/rb/site/lego/templates/mocs/includes/render_moc_main_top_buy.html

SELECT "accounts_usersetting"."id",
       "accounts_usersetting"."user_id",
       "accounts_usersetting"."name",
       "accounts_usersetting"."value"
  FROM
"accounts_usersetting"
 WHERE
("accounts_usersetting"."name" = 'moc' AND "accounts_usersetting"."user_id" = 366293)
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'moc' AND "accounts_usersetting"."user_id" = 366293)
0.22

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./lego/models/mocs.py in get_bi_preview_imgs(1594)
  if user.to_proxy().get_moc_option('preview_pdf_images'):

/home/nathan/rb/site/./accounts/models/user_extras.py in get_moc_option(237)
  options = self.get_moc_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_moc_options(229)
  if len(self.moc_options) == 0:

33 {% endwith %}
34
35 <div class="row row-condensed">
36 {% with moc.get_bi_preview_imgs as preview_imgs %}
37 {% for img in preview_imgs %}
38 <div class="col-condensed {% if preview_imgs|length == 2 %}col-xs-6{% elif preview_imgs|length == 1 %}col-xs-6 col-xs-offset-3{% else %}col-xs-4{% endif %}">
39 <a class="lightbox" href="{% cachebuster img %}" data-plugin-options='{"type":"image", "zoom": {"enabled": "true"}}'>
40 {% thumbs img settings.THUMBS_OPTIONS_MOC_PDF_PREVIEW calc_height=1 as img %}

/home/nathan/rb/site/lego/templates/mocs/includes/render_moc_main_top_buy.html

SELECT "lego_mocinstructionspdfpreview"."id",
       "lego_mocinstructionspdfpreview"."bi_file_id",
       "lego_mocinstructionspdfpreview"."page_nums",
       "lego_mocinstructions"."id",
       "lego_mocinstructions"."moc_id",
       "lego_mocinstructions"."uploaded",
       "lego_mocinstructions"."file_size",
       "lego_mocinstructions"."to_be_uploaded",
       "lego_mocinstructions"."s3file_id",
       "lego_mocinstructions"."use_quick_stamp",
       "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"."active_change_dt",
       "lego_baseset"."active_change_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."primary_moc_image_id",
       "lego_baseset"."is_gear",
       "lego_baseset"."is_book",
       "lego_baseset"."search_vector",
       "lego_baseset"."mfhash_vector",
       "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_mocinstructionspdfpreview"
 INNER JOIN
"lego_mocinstructions"
    ON
("lego_mocinstructionspdfpreview"."bi_file_id" = "lego_mocinstructions"."id")
 INNER JOIN
"lego_baseset"
    ON
("lego_mocinstructions"."moc_id" = "lego_baseset"."id")
  LEFT OUTER JOIN
"lego_files_s3file"
    ON
("lego_mocinstructions"."s3file_id" = "lego_files_s3file"."id")
 WHERE
"lego_mocinstructions"."moc_id" = 49160
SELECT ••• FROM "lego_mocinstructionspdfpreview" INNER JOIN "lego_mocinstructions" ON ("lego_mocinstructionspdfpreview"."bi_file_id" = "lego_mocinstructions"."id") INNER JOIN "lego_baseset" ON ("lego_mocinstructions"."moc_id" = "lego_baseset"."id") LEFT OUTER JOIN "lego_files_s3file" ON ("lego_mocinstructions"."s3file_id" = "lego_files_s3file"."id") WHERE "lego_mocinstructions"."moc_id" = 49160
0.95

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./lego/models/mocs.py in get_bi_preview_imgs(1595)
  img_urls = MocInstructionsPDFPreview.get_img_urls(self)

/home/nathan/rb/site/./lego/models/mocs.py in get_img_urls(2774)
  files = sorted(files, key=lambda x: str(x.bi_file.file))

33 {% endwith %}
34
35 <div class="row row-condensed">
36 {% with moc.get_bi_preview_imgs as preview_imgs %}
37 {% for img in preview_imgs %}
38 <div class="col-condensed {% if preview_imgs|length == 2 %}col-xs-6{% elif preview_imgs|length == 1 %}col-xs-6 col-xs-offset-3{% else %}col-xs-4{% endif %}">
39 <a class="lightbox" href="{% cachebuster img %}" data-plugin-options='{"type":"image", "zoom": {"enabled": "true"}}'>
40 {% thumbs img settings.THUMBS_OPTIONS_MOC_PDF_PREVIEW calc_height=1 as img %}

/home/nathan/rb/site/lego/templates/mocs/includes/render_moc_main_top_buy.html

SELECT COUNT(*) AS "__count"
  FROM
"lego_mocinstructions"
 WHERE
"lego_mocinstructions"."moc_id" = 49160
SELECT ••• FROM "lego_mocinstructions" WHERE "lego_mocinstructions"."moc_id" = 49160
0.10

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./lego/models/mocs.py in has_instructions(533)
  return MocInstructions.objects.filter(moc_id=self.id).count() > 0

46 </div>
47
48 {% if moc.is_for_sale and moc.is_hosted %}
49 {% if user_moc_purchase %}
50 {% url 'user_purchases' request.user.get_username as url %}
51 <p>You have purchased this MOC! Download the files below or via your <a href="{{ url }}">MOC Purchases</a> page.</p>
52 {% include "mocs/includes/render_moc_bi_files_sidebar.html" with purchase=user_moc_purchase bi_files=user_moc_purchase.bi_files %}
53 {% elif purchase_pending %}

/home/nathan/rb/site/lego/templates/mocs/includes/render_moc_main_top_buy.html

SELECT "accounts_userterms"."id",
       "accounts_userterms"."user_id",
       "accounts_userterms"."terms"
  FROM
"accounts_userterms"
 WHERE
"accounts_userterms"."user_id" = 366293
 LIMIT
21
SELECT ••• FROM "accounts_userterms" WHERE "accounts_userterms"."user_id" = 366293 LIMIT 21
0.28

Connection: default

Transaction status: In transaction

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/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)

1 {% load crispy_forms_tags %}
2 {% load rb_helpers %}
3 {% if moc.designer.terms.terms %}
4 <div class="row p-10">
5 <div class="col-xs-8 col-xs-offset-4">
6 <a href="{% url 'user_terms' moc.designer.username %}" target="_blank"><i class="fa fa-check-square-o"></i> Terms of Sale</a>
7 </div>

/home/nathan/rb/site/lego/templates/mocs/includes/buy_moc_bi_form.html

SELECT "lego_mocinstructions"."id",
       "lego_mocinstructions"."moc_id",
       "lego_mocinstructions"."uploaded",
       "lego_mocinstructions"."file_size",
       "lego_mocinstructions"."to_be_uploaded",
       "lego_mocinstructions"."s3file_id",
       "lego_mocinstructions"."use_quick_stamp"
  FROM
"lego_mocinstructions"
 WHERE
"lego_mocinstructions"."moc_id" = 49160
SELECT ••• FROM "lego_mocinstructions" WHERE "lego_mocinstructions"."moc_id" = 49160
2 similar queries. Duplicated 2 times.
0.09

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./lego/models/mocs.py in get_bi_type_generic(262)
  if self.has_pdf_instructions():

/home/nathan/rb/site/./lego/models/mocs.py in has_pdf_instructions(554)
  for bif in bi_files:

10 <div class="row p-10">
11 <div class="col-xs-3"><span class="pull-right">Buy:</span></div>
12 <div class="col-xs-9">
13 <b>{{ moc.get_bi_type_generic }}
14 <a href="/help/types-of-moc-building-instructions/" target="_blank"><i class="fa fa-question-circle"></i></a>
15 </b>
16 </div>
17 </div>

/home/nathan/rb/site/lego/templates/mocs/includes/buy_moc_bi_form.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" = 76625
 LIMIT
21
SELECT ••• FROM "lego_files_s3file" WHERE "lego_files_s3file"."id" = 76625 LIMIT 21
4 similar queries. Duplicated 2 times.
0.26

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./lego/models/mocs.py in get_bi_type_generic(262)
  if self.has_pdf_instructions():

/home/nathan/rb/site/./lego/models/mocs.py in has_pdf_instructions(555)
  if bif.is_pdf:

/home/nathan/rb/site/./lego/models/mocs.py in is_pdf(2245)
  return self.file.name.lower().endswith('.pdf')

/home/nathan/rb/site/./lego/models/mocs.py in file(2140)
  if self.s3file:

10 <div class="row p-10">
11 <div class="col-xs-3"><span class="pull-right">Buy:</span></div>
12 <div class="col-xs-9">
13 <b>{{ moc.get_bi_type_generic }}
14 <a href="/help/types-of-moc-building-instructions/" target="_blank"><i class="fa fa-question-circle"></i></a>
15 </b>
16 </div>
17 </div>

/home/nathan/rb/site/lego/templates/mocs/includes/buy_moc_bi_form.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" = 51910
 LIMIT
21
SELECT ••• FROM "lego_files_s3file" WHERE "lego_files_s3file"."id" = 51910 LIMIT 21
4 similar queries. Duplicated 2 times.
0.10

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./lego/models/mocs.py in get_bi_type_generic(262)
  if self.has_pdf_instructions():

/home/nathan/rb/site/./lego/models/mocs.py in has_pdf_instructions(555)
  if bif.is_pdf:

/home/nathan/rb/site/./lego/models/mocs.py in is_pdf(2245)
  return self.file.name.lower().endswith('.pdf')

/home/nathan/rb/site/./lego/models/mocs.py in file(2140)
  if self.s3file:

10 <div class="row p-10">
11 <div class="col-xs-3"><span class="pull-right">Buy:</span></div>
12 <div class="col-xs-9">
13 <b>{{ moc.get_bi_type_generic }}
14 <a href="/help/types-of-moc-building-instructions/" target="_blank"><i class="fa fa-question-circle"></i></a>
15 </b>
16 </div>
17 </div>

/home/nathan/rb/site/lego/templates/mocs/includes/buy_moc_bi_form.html

SELECT "lego_mocinstructions"."id",
       "lego_mocinstructions"."moc_id",
       "lego_mocinstructions"."uploaded",
       "lego_mocinstructions"."file_size",
       "lego_mocinstructions"."to_be_uploaded",
       "lego_mocinstructions"."s3file_id",
       "lego_mocinstructions"."use_quick_stamp"
  FROM
"lego_mocinstructions"
 WHERE
"lego_mocinstructions"."moc_id" = 49160
SELECT ••• FROM "lego_mocinstructions" WHERE "lego_mocinstructions"."moc_id" = 49160
2 similar queries. Duplicated 2 times.
0.09

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./lego/models/mocs.py in show_no_pdf_instructions_warning(547)
  return not self.has_pdf_instructions()

/home/nathan/rb/site/./lego/models/mocs.py in has_pdf_instructions(554)
  for bif in bi_files:

15 </b>
16 </div>
17 </div>
18 {% if moc.show_no_pdf_instructions_warning %}
19 {% show_warning '' 'This Premium MOC does NOT include PDF-formatted instructions.' %}
20 {% endif %}
21 <div class="row p-10">
22 <div class="col-xs-3"><span class="pull-right">Cost:</span></div>

/home/nathan/rb/site/lego/templates/mocs/includes/buy_moc_bi_form.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" = 76625
 LIMIT
21
SELECT ••• FROM "lego_files_s3file" WHERE "lego_files_s3file"."id" = 76625 LIMIT 21
4 similar queries. Duplicated 2 times.
0.09

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./lego/models/mocs.py in show_no_pdf_instructions_warning(547)
  return not self.has_pdf_instructions()

/home/nathan/rb/site/./lego/models/mocs.py in has_pdf_instructions(555)
  if bif.is_pdf:

/home/nathan/rb/site/./lego/models/mocs.py in is_pdf(2245)
  return self.file.name.lower().endswith('.pdf')

/home/nathan/rb/site/./lego/models/mocs.py in file(2140)
  if self.s3file:

15 </b>
16 </div>
17 </div>
18 {% if moc.show_no_pdf_instructions_warning %}
19 {% show_warning '' 'This Premium MOC does NOT include PDF-formatted instructions.' %}
20 {% endif %}
21 <div class="row p-10">
22 <div class="col-xs-3"><span class="pull-right">Cost:</span></div>

/home/nathan/rb/site/lego/templates/mocs/includes/buy_moc_bi_form.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" = 51910
 LIMIT
21
SELECT ••• FROM "lego_files_s3file" WHERE "lego_files_s3file"."id" = 51910 LIMIT 21
4 similar queries. Duplicated 2 times.
0.09

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./lego/models/mocs.py in show_no_pdf_instructions_warning(547)
  return not self.has_pdf_instructions()

/home/nathan/rb/site/./lego/models/mocs.py in has_pdf_instructions(555)
  if bif.is_pdf:

/home/nathan/rb/site/./lego/models/mocs.py in is_pdf(2245)
  return self.file.name.lower().endswith('.pdf')

/home/nathan/rb/site/./lego/models/mocs.py in file(2140)
  if self.s3file:

15 </b>
16 </div>
17 </div>
18 {% if moc.show_no_pdf_instructions_warning %}
19 {% show_warning '' 'This Premium MOC does NOT include PDF-formatted instructions.' %}
20 {% endif %}
21 <div class="row p-10">
22 <div class="col-xs-3"><span class="pull-right">Cost:</span></div>

/home/nathan/rb/site/lego/templates/mocs/includes/buy_moc_bi_form.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-11-16T01:10:58.262815+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-11-16T01:10:58.262813+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '49160'::jsonb)
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-11-16T01:10:58.262815+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-11-16T01:10:58.262813+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '49160'::jsonb) ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
4 similar queries.
0.51

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./lego/models/mocs.py in get_discounted_cost(385)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(562)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

23 <div class="col-xs-9">
24 <span id="moc_bi_cost_data"
25 data-coupon="{{ moc.applied_coupon.code }}"
26 data-cost="{{ moc.get_discounted_cost }}"
27 data-commission="{{ moc.get_discounted_cost|multiply_var:moc.get_commission_fee }}"
28 data-currency="{{ moc.currency.code }}"></span>
29 {% if applied_discount %}
30 <b>{{ moc.get_formatted_discounted_cost }}</b>

/home/nathan/rb/site/lego/templates/mocs/includes/buy_moc_bi_form.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-11-16T01:10:58.263948+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-11-16T01:10:58.263947+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '49160'::jsonb)
 ORDER BY
"lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC
 LIMIT
1
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-11-16T01:10:58.263948+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-11-16T01:10:58.263947+00:00'::timestamptz AND "lego_designerdiscount"."mocs" @> '49160'::jsonb) ORDER BY "lego_designerdiscount"."start_date" DESC, "lego_designerdiscount"."end_date" DESC LIMIT 1
4 similar queries.
0.31

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./lego/models/mocs.py in get_discounted_cost(385)
  discount = DesignerDiscount.get_moc_discount(self.id)

/home/nathan/rb/site/./lego/models/designers.py in get_moc_discount(562)
  return cls.get_active_discounts().filter(mocs__contains=int(moc_id)).first()

24 <span id="moc_bi_cost_data"
25 data-coupon="{{ moc.applied_coupon.code }}"
26 data-cost="{{ moc.get_discounted_cost }}"
27 data-commission="{{ moc.get_discounted_cost|multiply_var:moc.get_commission_fee }}"
28 data-currency="{{ moc.currency.code }}"></span>
29 {% if applied_discount %}
30 <b>{{ moc.get_formatted_discounted_cost }}</b>
31 <strike class="text-muted"><small>{{ moc.get_formatted_cost }}</small></strike>

/home/nathan/rb/site/lego/templates/mocs/includes/buy_moc_bi_form.html

SELECT "lego_designerpaypalaccount"."id",
       "lego_designerpaypalaccount"."user_id",
       "lego_designerpaypalaccount"."paypal_email",
       "lego_designerpaypalaccount"."paypal_merchant_id"
  FROM
"lego_designerpaypalaccount"
 WHERE
"lego_designerpaypalaccount"."user_id" = 366293
 LIMIT
21
SELECT ••• FROM "lego_designerpaypalaccount" WHERE "lego_designerpaypalaccount"."user_id" = 366293 LIMIT 21
0.36

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

75 <div class="col-xs-9"><a href="{% url 'designer_moc_sales' moc.designer.username %}?moc={{ moc.id }}"><b>{{ num_purchases }}</b></a> {% include 'rb/render_popover.html' with help_topic='MOC Sales' help_content='Only Rebrickable admins and the MOC designer can see the number of sales for a MOC.' %}</div>
76 </div>
77 {% endif %}
78 {% if not moc.designer.paypal_account.paypal_merchant_id and not moc.designer.paypal_account.paypal_email and not moc.designer.stripe_account.stripe_user_id %}
79 {% show_warning 'No Payment Methods' 'Sorry, it looks like the designer does not have any active payment methods setup yet.' %}
80 {% else %}
81 {# if just bought, page is reloaded with payment_intent=pi_3M3XnZJrPSxBprU31v9t65Or&payment_intent_client_secret=pi_3M3XnZJrPSxBprU31v9t65Or_secret_Ma8Z1z6OmxIskPFbWBJKhILUo&redirect_status=succeeded #}
82 <div id="buy_moc_error_msg_nomodal"></div>

/home/nathan/rb/site/lego/templates/mocs/includes/render_moc_main_top_buy.html

SELECT COUNT(*) AS "__count"
  FROM
"lego_designerfollower"
 WHERE
"lego_designerfollower"."designer_id" = 366293
SELECT ••• FROM "lego_designerfollower" WHERE "lego_designerfollower"."designer_id" = 366293
4 similar queries. Duplicated 4 times.
0.16

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

9 <h2 class="size-30 mt-0 mb-10 text-info num-followers" title="{{ set.designer.followers.count }}">{{ set.designer.get_num_followers_formatted }}</h2>
10 </a>
11 {% else %}
12 <h2 class="size-30 mt-0 mb-10 text-info num-followers" title="{{ set.designer.followers.count }}">{{ set.designer.get_num_followers_formatted }}</h2>
13 {% endif %}
14 {% if request.user.is_authenticated %}
15 {# designer_follow_btn is a class because it can appear twice on a moc (info tab on mobile) #}
16 <div class="designer_follow_btn_{{ set.designer.id }}">

/home/nathan/rb/site/lego/templates/mocs/includes/render_moc_likes_follows.html

SELECT COUNT(*) AS "__count"
  FROM
"lego_designerfollower"
 WHERE
"lego_designerfollower"."designer_id" = 366293
SELECT ••• FROM "lego_designerfollower" WHERE "lego_designerfollower"."designer_id" = 366293
4 similar queries. Duplicated 4 times.
0.11

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./lego/models/designers.py in get_num_followers_formatted(253)
  i = DesignerFollower.objects.filter(designer_id=self.id).count()

9 <h2 class="size-30 mt-0 mb-10 text-info num-followers" title="{{ set.designer.followers.count }}">{{ set.designer.get_num_followers_formatted }}</h2>
10 </a>
11 {% else %}
12 <h2 class="size-30 mt-0 mb-10 text-info num-followers" title="{{ set.designer.followers.count }}">{{ set.designer.get_num_followers_formatted }}</h2>
13 {% endif %}
14 {% if request.user.is_authenticated %}
15 {# designer_follow_btn is a class because it can appear twice on a moc (info tab on mobile) #}
16 <div class="designer_follow_btn_{{ set.designer.id }}">

/home/nathan/rb/site/lego/templates/mocs/includes/render_moc_likes_follows.html

SELECT COUNT(*) AS "__count"
  FROM
"accounts_usersetphoto"
 INNER JOIN
"auth_user"
    ON
("accounts_usersetphoto"."user_id" = "auth_user"."id")
 WHERE
("accounts_usersetphoto"."is_active" AND "accounts_usersetphoto"."set_id" = 49160 AND "auth_user"."is_active")
SELECT ••• FROM "accounts_usersetphoto" INNER JOIN "auth_user" ON ("accounts_usersetphoto"."user_id" = "auth_user"."id") WHERE ("accounts_usersetphoto"."is_active" AND "accounts_usersetphoto"."set_id" = 49160 AND "auth_user"."is_active")
0.40

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

43 <li><a href="#tab_photos" data-toggle="tab">
44 <span class="hidden-xs">Photos</span>
45 <span class="visible-xs text-center"><i class="fa fa-lg fa-photo"></i></span>
46 <span class="badge badge-light hidden-xs">{{ user_set_photos.count }}</span>
47 </a></li>
48 {% if can_edit %}
49 <li><a href="#tab_admin" data-toggle="tab" class="text-red">
50 <span class="hidden-xs">Admin</span>

/home/nathan/rb/site/lego/templates/mocs/includes/render_moc_main_tabs.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" = 'moc')
 LIMIT
21
SELECT ••• FROM "django_content_type" WHERE ("django_content_type"."app_label" = 'lego' AND "django_content_type"."model" = 'moc') LIMIT 21
0.21

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

5
6 <div id="comments-{{ page.id }}">
7
8 {% get_page_locked_status content_type page.id as is_page_locked %}
9
10 {% comment %}
11 Not using render_comment_list as it uses styles in ul/li that I can't seem to get working well with Smarty.
12 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" = 31 AND "rb_comments_pagelocked"."object_id" = 49160)
 LIMIT
1
SELECT ••• FROM "rb_comments_pagelocked" WHERE ("rb_comments_pagelocked"."content_type_id" = 31 AND "rb_comments_pagelocked"."object_id" = 49160) LIMIT 1
0.12

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

5
6 <div id="comments-{{ page.id }}">
7
8 {% get_page_locked_status content_type page.id as is_page_locked %}
9
10 {% comment %}
11 Not using render_comment_list as it uses styles in ul/li that I can't seem to get working well with Smarty.
12 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 "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" = 31 AND "django_comments"."object_pk" = '49160' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" AND NOT "django_comments"."is_removed")
 ORDER BY
"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" = 31 AND "django_comments"."object_pk" = '49160' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" AND NOT "django_comments"."is_removed") ORDER BY "threadedcomments_comment"."tree_path" ASC
1.91

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_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(62)
  comments = list(qs)

15 {% endcomment %}
16 {% if not comment_list %}
17 {# Get comments for a page #}
18 {% get_rb_comment_list for page as comment_list %}
19 {% get_comment_count for page as num_comments %}
20
21 {% if show_comment_count %}
22 <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 (93636, 366293, 344845, 372025, 461308, 565224, 584471, 894178)
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 (93636, 366293, 344845, 372025, 461308, 565224, 584471, 894178)
0.17

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_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(62)
  comments = list(qs)

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

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

SELECT "rb_comments_commentlike"."comment_id" AS "comment_id",
       COUNT("rb_comments_commentlike"."user_id") AS "user_id__count"
  FROM
"rb_comments_commentlike"
 WHERE
"rb_comments_commentlike"."comment_id" IN (497152, 297801, 212138, 127176, 103031, 79546, 79617, 79529, 79616)
 GROUP BY
1
SELECT ••• FROM "rb_comments_commentlike" WHERE "rb_comments_commentlike"."comment_id" IN (497152, 297801, 212138, 127176, 103031, 79546, 79617, 79529, 79616) GROUP BY 1
0.14

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_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(112)
  likes_map = {l['comment_id']: l['user_id__count'] for l in likes}

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

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

SELECT "rb_comments_commentlike"."id",
       "rb_comments_commentlike"."user_id",
       "rb_comments_commentlike"."comment_id"
  FROM
"rb_comments_commentlike"
 WHERE
("rb_comments_commentlike"."comment_id" IN (497152, 297801, 212138, 127176, 103031, 79546, 79617, 79529, 79616) AND "rb_comments_commentlike"."user_id" IS NULL)
SELECT ••• FROM "rb_comments_commentlike" WHERE ("rb_comments_commentlike"."comment_id" IN (497152, 297801, 212138, 127176, 103031, 79546, 79617, 79529, 79616) AND "rb_comments_commentlike"."user_id" IS NULL)
0.09

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_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(114)
  user_likes_map = {l.comment_id: True for l in user_likes}

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

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.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"."active_change_dt",
       "lego_baseset"."active_change_by_id",
       "lego_baseset"."last_checked_for_bi",
       "lego_baseset"."descr",
       "lego_baseset"."primary_photo_id",
       "lego_baseset"."primary_moc_image_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",
       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",
       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",
       "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",
       T10."id",
       T10."set_num",
       T10."name",
       T10."year",
       T10."theme_id",
       T10."set_type",
       T10."num_parts",
       T10."default_inventory_id",
       T10."is_active",
       T10."is_accessory",
       T10."added_dt",
       T10."added_by_id",
       T10."last_modified_dt",
       T10."last_modified_by_id",
       T10."active_change_dt",
       T10."active_change_by_id",
       T10."last_checked_for_bi",
       T10."descr",
       T10."primary_photo_id",
       T10."primary_moc_image_id",
       T10."is_gear",
       T10."is_book",
       T10."search_vector",
       T10."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_theme"
    ON
("lego_baseset"."theme_id" = "lego_theme"."id")
  LEFT OUTER JOIN
"lego_theme" T4
    ON
("lego_theme"."parent_id" = T4."id")
  LEFT OUTER JOIN
"lego_theme" T5
    ON
(T4."parent_id" = T5."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_baseset" T10
    ON
("lego_moc"."parent_set_1_id" = T10."id")
  LEFT OUTER JOIN
"lego_setstatstotal"
    ON
("lego_baseset"."id" = "lego_setstatstotal"."set_id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."baseset_ptr_id" = 49160)
 LIMIT
21
SELECT ••• FROM "lego_moc" INNER JOIN "lego_baseset" ON ("lego_moc"."baseset_ptr_id" = "lego_baseset"."id") INNER JOIN "lego_theme" ON ("lego_baseset"."theme_id" = "lego_theme"."id") LEFT OUTER JOIN "lego_theme" T4 ON ("lego_theme"."parent_id" = T4."id") LEFT OUTER JOIN "lego_theme" T5 ON (T4."parent_id" = T5."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_baseset" T10 ON ("lego_moc"."parent_set_1_id" = T10."id") LEFT OUTER JOIN "lego_setstatstotal" ON ("lego_baseset"."id" = "lego_setstatstotal"."set_id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."baseset_ptr_id" = 49160) LIMIT 21
1.86

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_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(126)
  page_owner = get_or_none(Moc.objects, id=context['page'].id)

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

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

/home/nathan/rb/site/rb_comments/templates/comments/render_comment_list.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 (49160))
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 (49160))
2 similar queries. Duplicated 2 times.
0.40

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_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(126)
  page_owner = get_or_none(Moc.objects, id=context['page'].id)

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

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

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

SELECT "rb_comments_commentlike"."id",
       "rb_comments_commentlike"."user_id",
       "rb_comments_commentlike"."comment_id"
  FROM
"rb_comments_commentlike"
 WHERE
("rb_comments_commentlike"."comment_id" IN (497152, 297801, 212138, 127176, 103031, 79546, 79617, 79529, 79616) AND "rb_comments_commentlike"."user_id" = 366293)
SELECT ••• FROM "rb_comments_commentlike" WHERE ("rb_comments_commentlike"."comment_id" IN (497152, 297801, 212138, 127176, 103031, 79546, 79617, 79529, 79616) AND "rb_comments_commentlike"."user_id" = 366293)
0.14

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_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(138)
  owner_likes_map = {l.comment_id: True for l in owner_likes}

15 {% endcomment %}
16 {% if not comment_list %}
17 {# Get comments for a page #}
18 {% get_rb_comment_list for page as comment_list %}
19 {% get_comment_count for page as num_comments %}
20
21 {% if show_comment_count %}
22 <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" = 31 AND "django_comments"."object_pk" = '49160' 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" = 31 AND "django_comments"."object_pk" = '49160' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" AND NOT "django_comments"."is_removed")
0.26

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_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()

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

/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" = 894178
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 894178 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
9 similar queries.
0.16

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_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="rb-comment__avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="rb-comment__avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="rb-comment__collapse-control 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" = 894178
 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" = 894178 LIMIT 21
7 similar queries.
0.18

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

55 <a href="/help/users-levels/">
56 <span class="rb-chip rb-chip--sm rb-chip--light" title="Based on {{ comment.user.points|int_to_abbr }} points">Level {{ comment.user.level }}</span>
57 </a>
58 {% if comment.user.is_admin %}
59 <a href="{% url 'about' %}#roles" title="This user has an Administrator role"><span class="rb-chip rb-chip--sm rb-chip--danger">{{ comment.user.get_rolename.0 }}</span></a>
60 {% elif page.is_moc and page.designer_id == comment.user_id %}
61 <span class="rb-chip rb-chip--sm rb-chip--premium" title="This user designed this MOC">Designed this MOC</span>
62 {% elif comment.user.get_rolename.0 %}

/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" = 894178)
 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" = 894178) LIMIT 1
14 similar queries. Duplicated 3 times.
0.24

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

55 <a href="/help/users-levels/">
56 <span class="rb-chip rb-chip--sm rb-chip--light" title="Based on {{ comment.user.points|int_to_abbr }} points">Level {{ comment.user.level }}</span>
57 </a>
58 {% if comment.user.is_admin %}
59 <a href="{% url 'about' %}#roles" title="This user has an Administrator role"><span class="rb-chip rb-chip--sm rb-chip--danger">{{ comment.user.get_rolename.0 }}</span></a>
60 {% elif page.is_moc and page.designer_id == comment.user_id %}
61 <span class="rb-chip rb-chip--sm rb-chip--premium" title="This user designed this MOC">Designed this MOC</span>
62 {% elif comment.user.get_rolename.0 %}

/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" = 894178)
 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" = 894178) LIMIT 1
14 similar queries. Duplicated 3 times.
0.21

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

60 {% elif page.is_moc and page.designer_id == comment.user_id %}
61 <span class="rb-chip rb-chip--sm rb-chip--premium" title="This user designed this MOC">Designed this MOC</span>
62 {% elif comment.user.get_rolename.0 %}
63 <span class="rb-chip rb-chip--sm rb-chip--info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
64 {% endif %}
65 {% if not comment.user.plan.is_free %}
66 {% if comment.user.is_public_plan %}
67 {{ 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" = 894178)
 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" = 894178) LIMIT 1
14 similar queries. Duplicated 3 times.
0.20

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

60 {% elif page.is_moc and page.designer_id == comment.user_id %}
61 <span class="rb-chip rb-chip--sm rb-chip--premium" title="This user designed this MOC">Designed this MOC</span>
62 {% elif comment.user.get_rolename.0 %}
63 <span class="rb-chip rb-chip--sm rb-chip--info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
64 {% endif %}
65 {% if not comment.user.plan.is_free %}
66 {% if comment.user.is_public_plan %}
67 {{ comment.user.get_plan_html }}

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

SELECT 1 AS "a"
  FROM
"accounts_mocpurchase"
 WHERE
("accounts_mocpurchase"."is_active" AND "accounts_mocpurchase"."moc_id" = 49160 AND "accounts_mocpurchase"."user_id" = 894178)
 LIMIT
1
SELECT ••• FROM "accounts_mocpurchase" WHERE ("accounts_mocpurchase"."is_active" AND "accounts_mocpurchase"."moc_id" = 49160 AND "accounts_mocpurchase"."user_id" = 894178) LIMIT 1
9 similar queries.
0.33

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./rb_comments/templatetags/rb_comments_filters.py in get_verified_purchase(199)
  if user.has_purchased_moc(moc.id):

/home/nathan/rb/site/./accounts/models/user_extras.py in has_purchased_moc(1038)
  return MocPurchase.objects.filter(user=self, moc_id=moc_id).exists()

68 {% endif %}
69 {% endif %}
70 {% if page.is_moc %}
71 {% get_verified_purchase comment.user page %}
72 {% endif %}
73 </div>
74 {% endif %}
75 </div>

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

SELECT 1 AS "a"
  FROM
"accounts_usersetphoto"
 WHERE
("accounts_usersetphoto"."is_active" AND "accounts_usersetphoto"."set_id" = 49160 AND "accounts_usersetphoto"."user_id" = 894178)
 LIMIT
1
SELECT ••• FROM "accounts_usersetphoto" WHERE ("accounts_usersetphoto"."is_active" AND "accounts_usersetphoto"."set_id" = 49160 AND "accounts_usersetphoto"."user_id" = 894178) LIMIT 1
9 similar queries.
0.11

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./rb_comments/templatetags/rb_comments_filters.py in get_verified_purchase(201)
  if user.has_uploaded_moc_photo(moc.id):

/home/nathan/rb/site/./accounts/models/user_extras.py in has_uploaded_moc_photo(1042)
  return UserSetPhoto.objects.filter(user=self, set_id=moc_id).exists()

68 {% endif %}
69 {% endif %}
70 {% if page.is_moc %}
71 {% get_verified_purchase comment.user page %}
72 {% endif %}
73 </div>
74 {% endif %}
75 </div>

/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" = 584471
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 584471 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
9 similar queries.
0.11

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_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="rb-comment__avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="rb-comment__avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="rb-comment__collapse-control 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" = 584471
 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" = 584471 LIMIT 21
7 similar queries.
0.14

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

55 <a href="/help/users-levels/">
56 <span class="rb-chip rb-chip--sm rb-chip--light" title="Based on {{ comment.user.points|int_to_abbr }} points">Level {{ comment.user.level }}</span>
57 </a>
58 {% if comment.user.is_admin %}
59 <a href="{% url 'about' %}#roles" title="This user has an Administrator role"><span class="rb-chip rb-chip--sm rb-chip--danger">{{ comment.user.get_rolename.0 }}</span></a>
60 {% elif page.is_moc and page.designer_id == comment.user_id %}
61 <span class="rb-chip rb-chip--sm rb-chip--premium" title="This user designed this MOC">Designed this MOC</span>
62 {% elif comment.user.get_rolename.0 %}

/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" = 584471)
 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" = 584471) LIMIT 1
14 similar queries. Duplicated 3 times.
0.20

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

55 <a href="/help/users-levels/">
56 <span class="rb-chip rb-chip--sm rb-chip--light" title="Based on {{ comment.user.points|int_to_abbr }} points">Level {{ comment.user.level }}</span>
57 </a>
58 {% if comment.user.is_admin %}
59 <a href="{% url 'about' %}#roles" title="This user has an Administrator role"><span class="rb-chip rb-chip--sm rb-chip--danger">{{ comment.user.get_rolename.0 }}</span></a>
60 {% elif page.is_moc and page.designer_id == comment.user_id %}
61 <span class="rb-chip rb-chip--sm rb-chip--premium" title="This user designed this MOC">Designed this MOC</span>
62 {% elif comment.user.get_rolename.0 %}

/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" = 584471)
 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" = 584471) LIMIT 1
14 similar queries. Duplicated 3 times.
0.21

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

60 {% elif page.is_moc and page.designer_id == comment.user_id %}
61 <span class="rb-chip rb-chip--sm rb-chip--premium" title="This user designed this MOC">Designed this MOC</span>
62 {% elif comment.user.get_rolename.0 %}
63 <span class="rb-chip rb-chip--sm rb-chip--info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
64 {% endif %}
65 {% if not comment.user.plan.is_free %}
66 {% if comment.user.is_public_plan %}
67 {{ 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" = 584471)
 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" = 584471) LIMIT 1
14 similar queries. Duplicated 3 times.
0.22

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

60 {% elif page.is_moc and page.designer_id == comment.user_id %}
61 <span class="rb-chip rb-chip--sm rb-chip--premium" title="This user designed this MOC">Designed this MOC</span>
62 {% elif comment.user.get_rolename.0 %}
63 <span class="rb-chip rb-chip--sm rb-chip--info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
64 {% endif %}
65 {% if not comment.user.plan.is_free %}
66 {% if comment.user.is_public_plan %}
67 {{ comment.user.get_plan_html }}

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

SELECT 1 AS "a"
  FROM
"accounts_mocpurchase"
 WHERE
("accounts_mocpurchase"."is_active" AND "accounts_mocpurchase"."moc_id" = 49160 AND "accounts_mocpurchase"."user_id" = 584471)
 LIMIT
1
SELECT ••• FROM "accounts_mocpurchase" WHERE ("accounts_mocpurchase"."is_active" AND "accounts_mocpurchase"."moc_id" = 49160 AND "accounts_mocpurchase"."user_id" = 584471) LIMIT 1
9 similar queries.
0.22

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./rb_comments/templatetags/rb_comments_filters.py in get_verified_purchase(199)
  if user.has_purchased_moc(moc.id):

/home/nathan/rb/site/./accounts/models/user_extras.py in has_purchased_moc(1038)
  return MocPurchase.objects.filter(user=self, moc_id=moc_id).exists()

68 {% endif %}
69 {% endif %}
70 {% if page.is_moc %}
71 {% get_verified_purchase comment.user page %}
72 {% endif %}
73 </div>
74 {% endif %}
75 </div>

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

SELECT 1 AS "a"
  FROM
"accounts_usersetphoto"
 WHERE
("accounts_usersetphoto"."is_active" AND "accounts_usersetphoto"."set_id" = 49160 AND "accounts_usersetphoto"."user_id" = 584471)
 LIMIT
1
SELECT ••• FROM "accounts_usersetphoto" WHERE ("accounts_usersetphoto"."is_active" AND "accounts_usersetphoto"."set_id" = 49160 AND "accounts_usersetphoto"."user_id" = 584471) LIMIT 1
9 similar queries.
0.08

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./rb_comments/templatetags/rb_comments_filters.py in get_verified_purchase(201)
  if user.has_uploaded_moc_photo(moc.id):

/home/nathan/rb/site/./accounts/models/user_extras.py in has_uploaded_moc_photo(1042)
  return UserSetPhoto.objects.filter(user=self, set_id=moc_id).exists()

68 {% endif %}
69 {% endif %}
70 {% if page.is_moc %}
71 {% get_verified_purchase comment.user page %}
72 {% endif %}
73 </div>
74 {% endif %}
75 </div>

/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" = 565224
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 565224 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
9 similar queries.
0.09

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_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="rb-comment__avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="rb-comment__avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="rb-comment__collapse-control 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" = 565224
 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" = 565224 LIMIT 21
7 similar queries.
0.13

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

55 <a href="/help/users-levels/">
56 <span class="rb-chip rb-chip--sm rb-chip--light" title="Based on {{ comment.user.points|int_to_abbr }} points">Level {{ comment.user.level }}</span>
57 </a>
58 {% if comment.user.is_admin %}
59 <a href="{% url 'about' %}#roles" title="This user has an Administrator role"><span class="rb-chip rb-chip--sm rb-chip--danger">{{ comment.user.get_rolename.0 }}</span></a>
60 {% elif page.is_moc and page.designer_id == comment.user_id %}
61 <span class="rb-chip rb-chip--sm rb-chip--premium" title="This user designed this MOC">Designed this MOC</span>
62 {% elif comment.user.get_rolename.0 %}

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

SELECT 1 AS "a"
  FROM
"accounts_mocpurchase"
 WHERE
("accounts_mocpurchase"."is_active" AND "accounts_mocpurchase"."moc_id" = 49160 AND "accounts_mocpurchase"."user_id" = 565224)
 LIMIT
1
SELECT ••• FROM "accounts_mocpurchase" WHERE ("accounts_mocpurchase"."is_active" AND "accounts_mocpurchase"."moc_id" = 49160 AND "accounts_mocpurchase"."user_id" = 565224) LIMIT 1
9 similar queries.
0.20

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./rb_comments/templatetags/rb_comments_filters.py in get_verified_purchase(199)
  if user.has_purchased_moc(moc.id):

/home/nathan/rb/site/./accounts/models/user_extras.py in has_purchased_moc(1038)
  return MocPurchase.objects.filter(user=self, moc_id=moc_id).exists()

68 {% endif %}
69 {% endif %}
70 {% if page.is_moc %}
71 {% get_verified_purchase comment.user page %}
72 {% endif %}
73 </div>
74 {% endif %}
75 </div>

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

SELECT 1 AS "a"
  FROM
"accounts_usersetphoto"
 WHERE
("accounts_usersetphoto"."is_active" AND "accounts_usersetphoto"."set_id" = 49160 AND "accounts_usersetphoto"."user_id" = 565224)
 LIMIT
1
SELECT ••• FROM "accounts_usersetphoto" WHERE ("accounts_usersetphoto"."is_active" AND "accounts_usersetphoto"."set_id" = 49160 AND "accounts_usersetphoto"."user_id" = 565224) LIMIT 1
9 similar queries.
0.09

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./rb_comments/templatetags/rb_comments_filters.py in get_verified_purchase(201)
  if user.has_uploaded_moc_photo(moc.id):

/home/nathan/rb/site/./accounts/models/user_extras.py in has_uploaded_moc_photo(1042)
  return UserSetPhoto.objects.filter(user=self, set_id=moc_id).exists()

68 {% endif %}
69 {% endif %}
70 {% if page.is_moc %}
71 {% get_verified_purchase comment.user page %}
72 {% endif %}
73 </div>
74 {% endif %}
75 </div>

/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" = 461308
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 461308 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
9 similar queries.
0.10

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_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="rb-comment__avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="rb-comment__avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="rb-comment__collapse-control 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" = 461308
 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" = 461308 LIMIT 21
7 similar queries.
0.14

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

55 <a href="/help/users-levels/">
56 <span class="rb-chip rb-chip--sm rb-chip--light" title="Based on {{ comment.user.points|int_to_abbr }} points">Level {{ comment.user.level }}</span>
57 </a>
58 {% if comment.user.is_admin %}
59 <a href="{% url 'about' %}#roles" title="This user has an Administrator role"><span class="rb-chip rb-chip--sm rb-chip--danger">{{ comment.user.get_rolename.0 }}</span></a>
60 {% elif page.is_moc and page.designer_id == comment.user_id %}
61 <span class="rb-chip rb-chip--sm rb-chip--premium" title="This user designed this MOC">Designed this MOC</span>
62 {% elif comment.user.get_rolename.0 %}

/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" = 461308)
 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" = 461308) LIMIT 1
14 similar queries. Duplicated 3 times.
0.20

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

55 <a href="/help/users-levels/">
56 <span class="rb-chip rb-chip--sm rb-chip--light" title="Based on {{ comment.user.points|int_to_abbr }} points">Level {{ comment.user.level }}</span>
57 </a>
58 {% if comment.user.is_admin %}
59 <a href="{% url 'about' %}#roles" title="This user has an Administrator role"><span class="rb-chip rb-chip--sm rb-chip--danger">{{ comment.user.get_rolename.0 }}</span></a>
60 {% elif page.is_moc and page.designer_id == comment.user_id %}
61 <span class="rb-chip rb-chip--sm rb-chip--premium" title="This user designed this MOC">Designed this MOC</span>
62 {% elif comment.user.get_rolename.0 %}

/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" = 461308)
 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" = 461308) LIMIT 1
14 similar queries. Duplicated 3 times.
0.14

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

60 {% elif page.is_moc and page.designer_id == comment.user_id %}
61 <span class="rb-chip rb-chip--sm rb-chip--premium" title="This user designed this MOC">Designed this MOC</span>
62 {% elif comment.user.get_rolename.0 %}
63 <span class="rb-chip rb-chip--sm rb-chip--info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
64 {% endif %}
65 {% if not comment.user.plan.is_free %}
66 {% if comment.user.is_public_plan %}
67 {{ 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" = 461308)
 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" = 461308) LIMIT 1
14 similar queries. Duplicated 3 times.
0.13

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

60 {% elif page.is_moc and page.designer_id == comment.user_id %}
61 <span class="rb-chip rb-chip--sm rb-chip--premium" title="This user designed this MOC">Designed this MOC</span>
62 {% elif comment.user.get_rolename.0 %}
63 <span class="rb-chip rb-chip--sm rb-chip--info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
64 {% endif %}
65 {% if not comment.user.plan.is_free %}
66 {% if comment.user.is_public_plan %}
67 {{ comment.user.get_plan_html }}

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

SELECT 1 AS "a"
  FROM
"accounts_mocpurchase"
 WHERE
("accounts_mocpurchase"."is_active" AND "accounts_mocpurchase"."moc_id" = 49160 AND "accounts_mocpurchase"."user_id" = 461308)
 LIMIT
1
SELECT ••• FROM "accounts_mocpurchase" WHERE ("accounts_mocpurchase"."is_active" AND "accounts_mocpurchase"."moc_id" = 49160 AND "accounts_mocpurchase"."user_id" = 461308) LIMIT 1
9 similar queries.
0.19

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./rb_comments/templatetags/rb_comments_filters.py in get_verified_purchase(199)
  if user.has_purchased_moc(moc.id):

/home/nathan/rb/site/./accounts/models/user_extras.py in has_purchased_moc(1038)
  return MocPurchase.objects.filter(user=self, moc_id=moc_id).exists()

68 {% endif %}
69 {% endif %}
70 {% if page.is_moc %}
71 {% get_verified_purchase comment.user page %}
72 {% endif %}
73 </div>
74 {% endif %}
75 </div>

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

SELECT 1 AS "a"
  FROM
"accounts_usersetphoto"
 WHERE
("accounts_usersetphoto"."is_active" AND "accounts_usersetphoto"."set_id" = 49160 AND "accounts_usersetphoto"."user_id" = 461308)
 LIMIT
1
SELECT ••• FROM "accounts_usersetphoto" WHERE ("accounts_usersetphoto"."is_active" AND "accounts_usersetphoto"."set_id" = 49160 AND "accounts_usersetphoto"."user_id" = 461308) LIMIT 1
9 similar queries.
0.07

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./rb_comments/templatetags/rb_comments_filters.py in get_verified_purchase(201)
  if user.has_uploaded_moc_photo(moc.id):

/home/nathan/rb/site/./accounts/models/user_extras.py in has_uploaded_moc_photo(1042)
  return UserSetPhoto.objects.filter(user=self, set_id=moc_id).exists()

68 {% endif %}
69 {% endif %}
70 {% if page.is_moc %}
71 {% get_verified_purchase comment.user page %}
72 {% endif %}
73 </div>
74 {% endif %}
75 </div>

/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" = 372025
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 372025 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
9 similar queries.
0.26

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_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="rb-comment__avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="rb-comment__avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="rb-comment__collapse-control 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" = 372025
 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" = 372025 LIMIT 21
7 similar queries.
0.15

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

55 <a href="/help/users-levels/">
56 <span class="rb-chip rb-chip--sm rb-chip--light" title="Based on {{ comment.user.points|int_to_abbr }} points">Level {{ comment.user.level }}</span>
57 </a>
58 {% if comment.user.is_admin %}
59 <a href="{% url 'about' %}#roles" title="This user has an Administrator role"><span class="rb-chip rb-chip--sm rb-chip--danger">{{ comment.user.get_rolename.0 }}</span></a>
60 {% elif page.is_moc and page.designer_id == comment.user_id %}
61 <span class="rb-chip rb-chip--sm rb-chip--premium" title="This user designed this MOC">Designed this MOC</span>
62 {% elif comment.user.get_rolename.0 %}

/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" = 372025)
 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" = 372025) LIMIT 1
14 similar queries. Duplicated 3 times.
0.16

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

55 <a href="/help/users-levels/">
56 <span class="rb-chip rb-chip--sm rb-chip--light" title="Based on {{ comment.user.points|int_to_abbr }} points">Level {{ comment.user.level }}</span>
57 </a>
58 {% if comment.user.is_admin %}
59 <a href="{% url 'about' %}#roles" title="This user has an Administrator role"><span class="rb-chip rb-chip--sm rb-chip--danger">{{ comment.user.get_rolename.0 }}</span></a>
60 {% elif page.is_moc and page.designer_id == comment.user_id %}
61 <span class="rb-chip rb-chip--sm rb-chip--premium" title="This user designed this MOC">Designed this MOC</span>
62 {% elif comment.user.get_rolename.0 %}

/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" = 372025)
 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" = 372025) LIMIT 1
14 similar queries. Duplicated 3 times.
0.13

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

60 {% elif page.is_moc and page.designer_id == comment.user_id %}
61 <span class="rb-chip rb-chip--sm rb-chip--premium" title="This user designed this MOC">Designed this MOC</span>
62 {% elif comment.user.get_rolename.0 %}
63 <span class="rb-chip rb-chip--sm rb-chip--info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
64 {% endif %}
65 {% if not comment.user.plan.is_free %}
66 {% if comment.user.is_public_plan %}
67 {{ 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" = 372025)
 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" = 372025) LIMIT 1
14 similar queries. Duplicated 3 times.
0.12

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

60 {% elif page.is_moc and page.designer_id == comment.user_id %}
61 <span class="rb-chip rb-chip--sm rb-chip--premium" title="This user designed this MOC">Designed this MOC</span>
62 {% elif comment.user.get_rolename.0 %}
63 <span class="rb-chip rb-chip--sm rb-chip--info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
64 {% endif %}
65 {% if not comment.user.plan.is_free %}
66 {% if comment.user.is_public_plan %}
67 {{ comment.user.get_plan_html }}

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

SELECT 1 AS "a"
  FROM
"accounts_mocpurchase"
 WHERE
("accounts_mocpurchase"."is_active" AND "accounts_mocpurchase"."moc_id" = 49160 AND "accounts_mocpurchase"."user_id" = 372025)
 LIMIT
1
SELECT ••• FROM "accounts_mocpurchase" WHERE ("accounts_mocpurchase"."is_active" AND "accounts_mocpurchase"."moc_id" = 49160 AND "accounts_mocpurchase"."user_id" = 372025) LIMIT 1
9 similar queries.
0.20

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./rb_comments/templatetags/rb_comments_filters.py in get_verified_purchase(199)
  if user.has_purchased_moc(moc.id):

/home/nathan/rb/site/./accounts/models/user_extras.py in has_purchased_moc(1038)
  return MocPurchase.objects.filter(user=self, moc_id=moc_id).exists()

68 {% endif %}
69 {% endif %}
70 {% if page.is_moc %}
71 {% get_verified_purchase comment.user page %}
72 {% endif %}
73 </div>
74 {% endif %}
75 </div>

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

SELECT 1 AS "a"
  FROM
"accounts_usersetphoto"
 WHERE
("accounts_usersetphoto"."is_active" AND "accounts_usersetphoto"."set_id" = 49160 AND "accounts_usersetphoto"."user_id" = 372025)
 LIMIT
1
SELECT ••• FROM "accounts_usersetphoto" WHERE ("accounts_usersetphoto"."is_active" AND "accounts_usersetphoto"."set_id" = 49160 AND "accounts_usersetphoto"."user_id" = 372025) LIMIT 1
9 similar queries.
0.08

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./rb_comments/templatetags/rb_comments_filters.py in get_verified_purchase(201)
  if user.has_uploaded_moc_photo(moc.id):

/home/nathan/rb/site/./accounts/models/user_extras.py in has_uploaded_moc_photo(1042)
  return UserSetPhoto.objects.filter(user=self, set_id=moc_id).exists()

68 {% endif %}
69 {% endif %}
70 {% if page.is_moc %}
71 {% get_verified_purchase comment.user page %}
72 {% endif %}
73 </div>
74 {% endif %}
75 </div>

/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" = 344845
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 344845 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
9 similar queries.
0.10

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_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="rb-comment__avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="rb-comment__avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="rb-comment__collapse-control 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" = 344845
 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" = 344845 LIMIT 21
7 similar queries.
0.14

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

55 <a href="/help/users-levels/">
56 <span class="rb-chip rb-chip--sm rb-chip--light" title="Based on {{ comment.user.points|int_to_abbr }} points">Level {{ comment.user.level }}</span>
57 </a>
58 {% if comment.user.is_admin %}
59 <a href="{% url 'about' %}#roles" title="This user has an Administrator role"><span class="rb-chip rb-chip--sm rb-chip--danger">{{ comment.user.get_rolename.0 }}</span></a>
60 {% elif page.is_moc and page.designer_id == comment.user_id %}
61 <span class="rb-chip rb-chip--sm rb-chip--premium" title="This user designed this MOC">Designed this MOC</span>
62 {% elif comment.user.get_rolename.0 %}

/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" = 344845)
 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" = 344845) LIMIT 1
14 similar queries.
0.14

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

55 <a href="/help/users-levels/">
56 <span class="rb-chip rb-chip--sm rb-chip--light" title="Based on {{ comment.user.points|int_to_abbr }} points">Level {{ comment.user.level }}</span>
57 </a>
58 {% if comment.user.is_admin %}
59 <a href="{% url 'about' %}#roles" title="This user has an Administrator role"><span class="rb-chip rb-chip--sm rb-chip--danger">{{ comment.user.get_rolename.0 }}</span></a>
60 {% elif page.is_moc and page.designer_id == comment.user_id %}
61 <span class="rb-chip rb-chip--sm rb-chip--premium" title="This user designed this MOC">Designed this MOC</span>
62 {% elif comment.user.get_rolename.0 %}

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

SELECT 1 AS "a"
  FROM
"accounts_mocpurchase"
 WHERE
("accounts_mocpurchase"."is_active" AND "accounts_mocpurchase"."moc_id" = 49160 AND "accounts_mocpurchase"."user_id" = 344845)
 LIMIT
1
SELECT ••• FROM "accounts_mocpurchase" WHERE ("accounts_mocpurchase"."is_active" AND "accounts_mocpurchase"."moc_id" = 49160 AND "accounts_mocpurchase"."user_id" = 344845) LIMIT 1
9 similar queries.
0.21

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./rb_comments/templatetags/rb_comments_filters.py in get_verified_purchase(199)
  if user.has_purchased_moc(moc.id):

/home/nathan/rb/site/./accounts/models/user_extras.py in has_purchased_moc(1038)
  return MocPurchase.objects.filter(user=self, moc_id=moc_id).exists()

68 {% endif %}
69 {% endif %}
70 {% if page.is_moc %}
71 {% get_verified_purchase comment.user page %}
72 {% endif %}
73 </div>
74 {% endif %}
75 </div>

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

SELECT 1 AS "a"
  FROM
"accounts_usersetphoto"
 WHERE
("accounts_usersetphoto"."is_active" AND "accounts_usersetphoto"."set_id" = 49160 AND "accounts_usersetphoto"."user_id" = 344845)
 LIMIT
1
SELECT ••• FROM "accounts_usersetphoto" WHERE ("accounts_usersetphoto"."is_active" AND "accounts_usersetphoto"."set_id" = 49160 AND "accounts_usersetphoto"."user_id" = 344845) LIMIT 1
9 similar queries.
0.09

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./rb_comments/templatetags/rb_comments_filters.py in get_verified_purchase(201)
  if user.has_uploaded_moc_photo(moc.id):

/home/nathan/rb/site/./accounts/models/user_extras.py in has_uploaded_moc_photo(1042)
  return UserSetPhoto.objects.filter(user=self, set_id=moc_id).exists()

68 {% endif %}
69 {% endif %}
70 {% if page.is_moc %}
71 {% get_verified_purchase comment.user page %}
72 {% endif %}
73 </div>
74 {% endif %}
75 </div>

/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" = 79546
 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" = 79546 LIMIT 21
2 similar queries.
0.25

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

145 {% if not comment.open and not comment.close %}</li>{% endif %}
146 {% if comment.open %}
147 <ul class="rb-comment__thread">{% endif %}
148 <li class="rb-comment__item{% if comment.parent and comment.depth < 7 %} rb-comment__item--reply{% elif comment.parent %} rb-comment__item--deep{% endif %}">
149 {% include "comments/comment.html" %}
150 {% for close in comment.close %}
151 </li>
152 </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" = 366293
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 366293 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
9 similar queries. Duplicated 2 times.
0.10

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_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="rb-comment__avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="rb-comment__avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="rb-comment__collapse-control 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 1 AS "a"
  FROM
"accounts_mocpurchase"
 WHERE
("accounts_mocpurchase"."is_active" AND "accounts_mocpurchase"."moc_id" = 49160 AND "accounts_mocpurchase"."user_id" = 366293)
 LIMIT
1
SELECT ••• FROM "accounts_mocpurchase" WHERE ("accounts_mocpurchase"."is_active" AND "accounts_mocpurchase"."moc_id" = 49160 AND "accounts_mocpurchase"."user_id" = 366293) LIMIT 1
9 similar queries. Duplicated 2 times.
0.10

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./rb_comments/templatetags/rb_comments_filters.py in get_verified_purchase(199)
  if user.has_purchased_moc(moc.id):

/home/nathan/rb/site/./accounts/models/user_extras.py in has_purchased_moc(1038)
  return MocPurchase.objects.filter(user=self, moc_id=moc_id).exists()

68 {% endif %}
69 {% endif %}
70 {% if page.is_moc %}
71 {% get_verified_purchase comment.user page %}
72 {% endif %}
73 </div>
74 {% endif %}
75 </div>

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

SELECT 1 AS "a"
  FROM
"accounts_usersetphoto"
 WHERE
("accounts_usersetphoto"."is_active" AND "accounts_usersetphoto"."set_id" = 49160 AND "accounts_usersetphoto"."user_id" = 366293)
 LIMIT
1
SELECT ••• FROM "accounts_usersetphoto" WHERE ("accounts_usersetphoto"."is_active" AND "accounts_usersetphoto"."set_id" = 49160 AND "accounts_usersetphoto"."user_id" = 366293) LIMIT 1
9 similar queries. Duplicated 2 times.
0.08

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./rb_comments/templatetags/rb_comments_filters.py in get_verified_purchase(201)
  if user.has_uploaded_moc_photo(moc.id):

/home/nathan/rb/site/./accounts/models/user_extras.py in has_uploaded_moc_photo(1042)
  return UserSetPhoto.objects.filter(user=self, set_id=moc_id).exists()

68 {% endif %}
69 {% endif %}
70 {% if page.is_moc %}
71 {% get_verified_purchase comment.user page %}
72 {% endif %}
73 </div>
74 {% endif %}
75 </div>

/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" = 93636
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 93636 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
9 similar queries.
0.08

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_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="rb-comment__avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="rb-comment__avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="rb-comment__collapse-control 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" = 93636
 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" = 93636 LIMIT 21
7 similar queries.
0.13

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

55 <a href="/help/users-levels/">
56 <span class="rb-chip rb-chip--sm rb-chip--light" title="Based on {{ comment.user.points|int_to_abbr }} points">Level {{ comment.user.level }}</span>
57 </a>
58 {% if comment.user.is_admin %}
59 <a href="{% url 'about' %}#roles" title="This user has an Administrator role"><span class="rb-chip rb-chip--sm rb-chip--danger">{{ comment.user.get_rolename.0 }}</span></a>
60 {% elif page.is_moc and page.designer_id == comment.user_id %}
61 <span class="rb-chip rb-chip--sm rb-chip--premium" title="This user designed this MOC">Designed this MOC</span>
62 {% elif comment.user.get_rolename.0 %}

/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" = 93636)
 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" = 93636) LIMIT 1
14 similar queries.
0.17

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

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

55 <a href="/help/users-levels/">
56 <span class="rb-chip rb-chip--sm rb-chip--light" title="Based on {{ comment.user.points|int_to_abbr }} points">Level {{ comment.user.level }}</span>
57 </a>
58 {% if comment.user.is_admin %}
59 <a href="{% url 'about' %}#roles" title="This user has an Administrator role"><span class="rb-chip rb-chip--sm rb-chip--danger">{{ comment.user.get_rolename.0 }}</span></a>
60 {% elif page.is_moc and page.designer_id == comment.user_id %}
61 <span class="rb-chip rb-chip--sm rb-chip--premium" title="This user designed this MOC">Designed this MOC</span>
62 {% elif comment.user.get_rolename.0 %}

/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" = 93636)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 93636) LIMIT 21
0.10

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in is_public_plan(670)
  return self.get_privacy_option('is_public_plan')

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_option(285)
  options = self.get_privacy_options()

/home/nathan/rb/site/./accounts/models/user_extras.py in get_privacy_options(279)
  options = UserSetting.objects.get(user=self, name=UserSetting.USER_SETTING_PRIVACY_OPTIONS)

63 <span class="rb-chip rb-chip--sm rb-chip--info" title="{{ comment.user.get_rolename.1 }}">{{ comment.user.get_rolename.0 }}</span>
64 {% endif %}
65 {% if not comment.user.plan.is_free %}
66 {% if comment.user.is_public_plan %}
67 {{ comment.user.get_plan_html }}
68 {% endif %}
69 {% endif %}
70 {% if page.is_moc %}

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

SELECT 1 AS "a"
  FROM
"accounts_mocpurchase"
 WHERE
("accounts_mocpurchase"."is_active" AND "accounts_mocpurchase"."moc_id" = 49160 AND "accounts_mocpurchase"."user_id" = 93636)
 LIMIT
1
SELECT ••• FROM "accounts_mocpurchase" WHERE ("accounts_mocpurchase"."is_active" AND "accounts_mocpurchase"."moc_id" = 49160 AND "accounts_mocpurchase"."user_id" = 93636) LIMIT 1
9 similar queries.
0.09

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./rb_comments/templatetags/rb_comments_filters.py in get_verified_purchase(199)
  if user.has_purchased_moc(moc.id):

/home/nathan/rb/site/./accounts/models/user_extras.py in has_purchased_moc(1038)
  return MocPurchase.objects.filter(user=self, moc_id=moc_id).exists()

68 {% endif %}
69 {% endif %}
70 {% if page.is_moc %}
71 {% get_verified_purchase comment.user page %}
72 {% endif %}
73 </div>
74 {% endif %}
75 </div>

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

SELECT 1 AS "a"
  FROM
"accounts_usersetphoto"
 WHERE
("accounts_usersetphoto"."is_active" AND "accounts_usersetphoto"."set_id" = 49160 AND "accounts_usersetphoto"."user_id" = 93636)
 LIMIT
1
SELECT ••• FROM "accounts_usersetphoto" WHERE ("accounts_usersetphoto"."is_active" AND "accounts_usersetphoto"."set_id" = 49160 AND "accounts_usersetphoto"."user_id" = 93636) LIMIT 1
9 similar queries.
0.08

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./rb_comments/templatetags/rb_comments_filters.py in get_verified_purchase(201)
  if user.has_uploaded_moc_photo(moc.id):

/home/nathan/rb/site/./accounts/models/user_extras.py in has_uploaded_moc_photo(1042)
  return UserSetPhoto.objects.filter(user=self, set_id=moc_id).exists()

68 {% endif %}
69 {% endif %}
70 {% if page.is_moc %}
71 {% get_verified_purchase comment.user page %}
72 {% endif %}
73 </div>
74 {% endif %}
75 </div>

/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" = 79529
 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" = 79529 LIMIT 21
2 similar queries.
0.13

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

145 {% if not comment.open and not comment.close %}</li>{% endif %}
146 {% if comment.open %}
147 <ul class="rb-comment__thread">{% endif %}
148 <li class="rb-comment__item{% if comment.parent and comment.depth < 7 %} rb-comment__item--reply{% elif comment.parent %} rb-comment__item--deep{% endif %}">
149 {% include "comments/comment.html" %}
150 {% for close in comment.close %}
151 </li>
152 </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" = 366293
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 366293 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
9 similar queries. Duplicated 2 times.
0.10

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_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="rb-comment__avatar" width="75px" height="75px">
38 {% else %}
39 <img data-src="{% avatar_url comment.user 75 %}" class="rb-comment__avatar" width="75px" height="75px" alt="Avatar image for Rebrickable user {{ comment.user }}">
40 {% endif %}
41 {# collapse/expand child comments #}
42 <div class="rb-comment__collapse-control 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 1 AS "a"
  FROM
"accounts_mocpurchase"
 WHERE
("accounts_mocpurchase"."is_active" AND "accounts_mocpurchase"."moc_id" = 49160 AND "accounts_mocpurchase"."user_id" = 366293)
 LIMIT
1
SELECT ••• FROM "accounts_mocpurchase" WHERE ("accounts_mocpurchase"."is_active" AND "accounts_mocpurchase"."moc_id" = 49160 AND "accounts_mocpurchase"."user_id" = 366293) LIMIT 1
9 similar queries. Duplicated 2 times.
0.10

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./rb_comments/templatetags/rb_comments_filters.py in get_verified_purchase(199)
  if user.has_purchased_moc(moc.id):

/home/nathan/rb/site/./accounts/models/user_extras.py in has_purchased_moc(1038)
  return MocPurchase.objects.filter(user=self, moc_id=moc_id).exists()

68 {% endif %}
69 {% endif %}
70 {% if page.is_moc %}
71 {% get_verified_purchase comment.user page %}
72 {% endif %}
73 </div>
74 {% endif %}
75 </div>

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

SELECT 1 AS "a"
  FROM
"accounts_usersetphoto"
 WHERE
("accounts_usersetphoto"."is_active" AND "accounts_usersetphoto"."set_id" = 49160 AND "accounts_usersetphoto"."user_id" = 366293)
 LIMIT
1
SELECT ••• FROM "accounts_usersetphoto" WHERE ("accounts_usersetphoto"."is_active" AND "accounts_usersetphoto"."set_id" = 49160 AND "accounts_usersetphoto"."user_id" = 366293) LIMIT 1
9 similar queries. Duplicated 2 times.
0.07

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./rb_comments/templatetags/rb_comments_filters.py in get_verified_purchase(201)
  if user.has_uploaded_moc_photo(moc.id):

/home/nathan/rb/site/./accounts/models/user_extras.py in has_uploaded_moc_photo(1042)
  return UserSetPhoto.objects.filter(user=self, set_id=moc_id).exists()

68 {% endif %}
69 {% endif %}
70 {% if page.is_moc %}
71 {% get_verified_purchase comment.user page %}
72 {% endif %}
73 </div>
74 {% endif %}
75 </div>

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

SELECT COUNT(*) AS "__count"
  FROM
"lego_designerfollower"
 WHERE
"lego_designerfollower"."designer_id" = 366293
SELECT ••• FROM "lego_designerfollower" WHERE "lego_designerfollower"."designer_id" = 366293
4 similar queries. Duplicated 4 times.
0.19

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

9 <h2 class="size-30 mt-0 mb-10 text-info num-followers" title="{{ set.designer.followers.count }}">{{ set.designer.get_num_followers_formatted }}</h2>
10 </a>
11 {% else %}
12 <h2 class="size-30 mt-0 mb-10 text-info num-followers" title="{{ set.designer.followers.count }}">{{ set.designer.get_num_followers_formatted }}</h2>
13 {% endif %}
14 {% if request.user.is_authenticated %}
15 {# designer_follow_btn is a class because it can appear twice on a moc (info tab on mobile) #}
16 <div class="designer_follow_btn_{{ set.designer.id }}">

/home/nathan/rb/site/lego/templates/mocs/includes/render_moc_likes_follows.html

SELECT COUNT(*) AS "__count"
  FROM
"lego_designerfollower"
 WHERE
"lego_designerfollower"."designer_id" = 366293
SELECT ••• FROM "lego_designerfollower" WHERE "lego_designerfollower"."designer_id" = 366293
4 similar queries. Duplicated 4 times.
0.08

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

/home/nathan/rb/site/./lego/models/designers.py in get_num_followers_formatted(253)
  i = DesignerFollower.objects.filter(designer_id=self.id).count()

9 <h2 class="size-30 mt-0 mb-10 text-info num-followers" title="{{ set.designer.followers.count }}">{{ set.designer.get_num_followers_formatted }}</h2>
10 </a>
11 {% else %}
12 <h2 class="size-30 mt-0 mb-10 text-info num-followers" title="{{ set.designer.followers.count }}">{{ set.designer.get_num_followers_formatted }}</h2>
13 {% endif %}
14 {% if request.user.is_authenticated %}
15 {# designer_follow_btn is a class because it can appear twice on a moc (info tab on mobile) #}
16 <div class="designer_follow_btn_{{ set.designer.id }}">

/home/nathan/rb/site/lego/templates/mocs/includes/render_moc_likes_follows.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" = 366293
 LIMIT
21
SELECT ••• FROM "auth_user" WHERE "auth_user"."id" = 366293 LIMIT 21
3 similar queries. Duplicated 3 times.
0.15

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

4 {% with cache_timeout=user.is_authenticated|yesno:"3600,3600" %}
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 {% if set.added_dt and set.added_by %}
8 <div><small><i class="fa fa-fw fa-plus" title="Added"></i> {{ set.added_dt }}
9 {% if set.added_by %}by
10 <a href="{% url 'user_profile' set.added_by.username %}">{{ set.added_by.username }}</a>
11 {% endif %}</small></div>

/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" = 366293
 LIMIT
21
SELECT ••• FROM "auth_user" WHERE "auth_user"."id" = 366293 LIMIT 21
3 similar queries. Duplicated 3 times.
0.08

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/views/mocs.py in moc_details(772)
  return render(request, 'mocs/moc_details.html', context)

16 {% endif %}</small></div>
17 {% endif %}
18 <div><small><i class="fa fa-fw fa-edit" title="Updated"></i> {{ changes.updated.timestamp }}
19 {% if changes.updated.user %}by
20 <a href="{% url 'user_profile' changes.updated.user.get_username %}">{{ changes.updated.user.get_username }}</a>
21 {% endif %}</small></div>
22 <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>
23 {% if user.is_authenticated %}

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

Log messages

No messages logged.