RebrickMat - LEGO Building Mat
DJDT

Time

Resource usage

Resource Value
User CPU time 146.401 msec
System CPU time 2.629 msec
Total CPU time 149.030 msec
Elapsed time 252.306 msec
Context switches 101 voluntary, 2 involuntary

Browser timing

Timing attribute Timeline Milliseconds since navigation start (+length)

SQL queries from 1 connection

  • default 103.00 ms (12 queries including 6 similar and 2 duplicates )
Query Timeline Time (ms) Action
SELECT "django_content_type"."id",
       "django_content_type"."app_label",
       "django_content_type"."model"
  FROM
"django_content_type"
 WHERE
("django_content_type"."app_label" = 'blog' AND "django_content_type"."model" = 'article')
 LIMIT
21
SELECT ••• FROM "django_content_type" WHERE ("django_content_type"."app_label" = 'blog' AND "django_content_type"."model" = 'article') LIMIT 21
0.24

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/mocs.py in browse_mocs(305)
  context['blog_mocs'] = Article.get_moc_articles()

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

/home/nathan/rb/site/./blog/models.py in get_moc_articles(294)
  return list(cls.objects.select_related('author').filter(Q(tags__name__iexact='moc')|Q(tags__name__iexact='mocs')|Q(tags__name__iexact='moc review')).order_by('-published_date')[:8])

/home/nathan/venv_rb310/lib/python3.10/site-packages/taggit/managers.py in get_extra_restriction(777)
  content_type_ids = [

/home/nathan/venv_rb310/lib/python3.10/site-packages/taggit/managers.py in <listcomp>(778)
  ContentType.objects.get_for_model(subclass).pk

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",
       "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
"blog_article"
 INNER JOIN
"taggit_taggeditem"
    ON
("blog_article"."id" = "taggit_taggeditem"."object_id" AND ("taggit_taggeditem"."content_type_id" = 12))
 INNER JOIN
"taggit_tag"
    ON
("taggit_taggeditem"."tag_id" = "taggit_tag"."id")
  LEFT OUTER JOIN
"auth_user"
    ON
("blog_article"."author_id" = "auth_user"."id")
 WHERE
("blog_article"."is_active" AND (UPPER("taggit_tag"."name"::text) = UPPER('moc') OR UPPER("taggit_tag"."name"::text) = UPPER('mocs') OR UPPER("taggit_tag"."name"::text) = UPPER('moc review')))
 ORDER BY
"blog_article"."published_date" DESC
 LIMIT
8
SELECT ••• FROM "blog_article" INNER JOIN "taggit_taggeditem" ON ("blog_article"."id" = "taggit_taggeditem"."object_id" AND ("taggit_taggeditem"."content_type_id" = 12)) INNER JOIN "taggit_tag" ON ("taggit_taggeditem"."tag_id" = "taggit_tag"."id") LEFT OUTER JOIN "auth_user" ON ("blog_article"."author_id" = "auth_user"."id") WHERE ("blog_article"."is_active" AND (UPPER("taggit_tag"."name"::text) = UPPER('moc') OR UPPER("taggit_tag"."name"::text) = UPPER('mocs') OR UPPER("taggit_tag"."name"::text) = UPPER('moc review'))) ORDER BY "blog_article"."published_date" DESC LIMIT 8
11.02

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/mocs.py in browse_mocs(305)
  context['blog_mocs'] = Article.get_moc_articles()

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

/home/nathan/rb/site/./blog/models.py in get_moc_articles(294)
  return list(cls.objects.select_related('author').filter(Q(tags__name__iexact='moc')|Q(tags__name__iexact='mocs')|Q(tags__name__iexact='moc review')).order_by('-published_date')[:8])

SELECT (
        select coalesce(sum(impressions), 0)
          from
lego_designerimpressions i
         where
i.designer_id=lego_moc.designer_id
           and
i.day=(now() at time zone 'UTC')::date
       ) AS "imps",
       "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",
       "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",
       "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_designer"
    ON
("lego_moc"."designer_id" = "lego_designer"."user_ptr_id")
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
  LEFT OUTER JOIN
"accounts_userplan"
    ON
("auth_user"."id" = "accounts_userplan"."user_id")
  LEFT OUTER JOIN
"plans_plan"
    ON
("accounts_userplan"."plan_id" = "plans_plan"."id")
  LEFT OUTER JOIN
"lego_setstatstotal"
    ON
("lego_baseset"."id" = "lego_setstatstotal"."set_id")
 WHERE
("lego_baseset"."is_active" AND "lego_moc"."baseset_ptr_id" IN (SELECT U0."moc_id" AS "moc_id" FROM "lego_featuredmoccandidates" U0))
 ORDER BY
1 ASC, RANDOM() ASC
 LIMIT
20
SELECT (select coalesce(sum(impressions), 0) from lego_designerimpressions i where i.designer_id=lego_moc.designer_id and i.day=(now() at time zone 'UTC')::date) AS "imps", "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", "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", "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_designer" ON ("lego_moc"."designer_id" = "lego_designer"."user_ptr_id") INNER JOIN "auth_user" ON ("lego_designer"."user_ptr_id" = "auth_user"."id") LEFT OUTER JOIN "accounts_userplan" ON ("auth_user"."id" = "accounts_userplan"."user_id") LEFT OUTER JOIN "plans_plan" ON ("accounts_userplan"."plan_id" = "plans_plan"."id") LEFT OUTER JOIN "lego_setstatstotal" ON ("lego_baseset"."id" = "lego_setstatstotal"."set_id") WHERE ("lego_baseset"."is_active" AND "lego_moc"."baseset_ptr_id" IN (SELECT ••• FROM "lego_featuredmoccandidates" U0)) ORDER BY 1 ASC, RANDOM() ASC LIMIT 20
87.58

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/mocs.py in browse_mocs(306)
  context['featured_mocs'] = Moc.get_featured_mocs(limit=2, user_id=request.user.id if request.user.is_authenticated else None, location='sidebar')

/home/nathan/rb/site/./lego/models/mocs.py in get_featured_mocs(1298)
  mocs = get_featured_mocs_cached(1, high_quality_only=high_quality_only, location=location)

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

/home/nathan/rb/site/./lego/models/mocs.py in get_featured_mocs_cached(1276)
  if len(mocs) == 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-15T23:49:13.616537+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-11-15T23:49:13.616534+00:00'::timestamptz AND (mocs @> ANY (ARRAY[['62735', '319037']]::jsonb[])))
SELECT ••• FROM "lego_designerdiscount" WHERE ("lego_designerdiscount"."end_date" > '2026-11-15T23:49:13.616537+00:00'::timestamptz AND "lego_designerdiscount"."start_date" <= '2026-11-15T23:49:13.616534+00:00'::timestamptz AND (mocs @> ANY (ARRAY[['62735', '319037']]::jsonb[])))
0.57

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/mocs.py in browse_mocs(314)
  Moc.attach_discount_to_mocs(context['featured_mocs'])

/home/nathan/rb/site/./lego/models/sets.py in attach_discount_to_mocs(1582)
  for discount in discounts:

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

Connection: default

Transaction status: Idle

/home/nathan/rb/site/./lego/views/mocs.py in browse_mocs(384)
  return render(request, 'mocs/mocs.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 "rb_sitemessage"."id",
       "rb_sitemessage"."effdt",
       "rb_sitemessage"."enddt",
       "rb_sitemessage"."priority",
       "rb_sitemessage"."title",
       "rb_sitemessage"."msg"
  FROM
"rb_sitemessage"
 WHERE
("rb_sitemessage"."effdt" <= '2026-11-15T23:49:13.628647+00:00'::timestamptz AND "rb_sitemessage"."enddt" > '2026-11-15T23:49:13.628648+00:00'::timestamptz)
 ORDER BY
"rb_sitemessage"."effdt" ASC
SELECT ••• FROM "rb_sitemessage" WHERE ("rb_sitemessage"."effdt" <= '2026-11-15T23:49:13.628647+00:00'::timestamptz AND "rb_sitemessage"."enddt" > '2026-11-15T23:49:13.628648+00:00'::timestamptz) ORDER BY "rb_sitemessage"."effdt" ASC
0.14

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./rb/templatetags/rb_helpers.py in render_site_messages(355)
  for msg in msgs:

28 <div class="container">
29
30 {% render_user_banner 'mocs' %}
31 {% render_site_messages %}
32
33 {% if show_job_msg %}
34 {% show_tip 'Wanted - MOC Approvers' 'We are currently looking for people who can help with MOC Approvals. Please see our <a href="/jobs/">Jobs page</a> for more details if you are interested.' dismissible_id='20260926_job' %}
35 {% endif %}

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

SELECT "lego_theme"."id",
       "lego_theme"."parent_id",
       "lego_theme"."name",
       "lego_theme"."slug",
       "lego_theme"."set_count",
       "lego_theme"."t1_id",
       "lego_theme"."t1_name",
       "lego_theme"."t2_name",
       "lego_theme"."t3_name",
       "lego_theme"."lego_blurb",
       "lego_theme"."banner_img",
       "lego_theme"."descr",
       T2."id",
       T2."parent_id",
       T2."name",
       T2."slug",
       T2."set_count",
       T2."t1_id",
       T2."t1_name",
       T2."t2_name",
       T2."t3_name",
       T2."lego_blurb",
       T2."banner_img",
       T2."descr",
       T3."id",
       T3."parent_id",
       T3."name",
       T3."slug",
       T3."set_count",
       T3."t1_id",
       T3."t1_name",
       T3."t2_name",
       T3."t3_name",
       T3."lego_blurb",
       T3."banner_img",
       T3."descr"
  FROM
"lego_theme"
  LEFT OUTER JOIN
"lego_theme" T2
    ON
("lego_theme"."parent_id" = T2."id")
  LEFT OUTER JOIN
"lego_theme" T3
    ON
(T2."parent_id" = T3."id")
 ORDER BY
"lego_theme"."t1_name" ASC, "lego_theme"."t2_name" ASC, "lego_theme"."t3_name" ASC
SELECT ••• FROM "lego_theme" LEFT OUTER JOIN "lego_theme" T2 ON ("lego_theme"."parent_id" = T2."id") LEFT OUTER JOIN "lego_theme" T3 ON (T2."parent_id" = T3."id") ORDER BY "lego_theme"."t1_name" ASC, "lego_theme"."t2_name" ASC, "lego_theme"."t3_name" ASC
2 similar queries. Duplicated 2 times.
1.06

Connection: default

Transaction status: Idle

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

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/templatetags/crispy_forms_tags.py in render(204)
  c = self.get_render(context).flatten()

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/templatetags/crispy_forms_tags.py in get_render(120)
  actual_form.form_html = helper.render_layout(

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/helper.py in render_layout(301)
  html = self.layout.render(form, self.form_style, context, template_pack=template_pack)

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/layout.py in render(135)
  return self.get_rendered_fields(form, form_style, context, template_pack, **kwargs)

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/layout.py in get_rendered_fields(96)
  return "".join(

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/layout.py in <genexpr>(97)
  render_field(field, form, form_style, context, template_pack=template_pack, **kwargs)

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/utils.py in render_field(66)
  return field.render(form, form_style, context, template_pack=template_pack)

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/layout.py in render(367)
  fields = self.get_rendered_fields(form, form_style, context, template_pack, **kwargs)

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/layout.py in get_rendered_fields(96)
  return "".join(

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/layout.py in <genexpr>(97)
  render_field(field, form, form_style, context, template_pack=template_pack, **kwargs)

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/utils.py in render_field(66)
  return field.render(form, form_style, context, template_pack=template_pack)

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/layout.py in render(457)
  return self.get_rendered_fields(

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/layout.py in get_rendered_fields(96)
  return "".join(

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/layout.py in <genexpr>(97)
  render_field(field, form, form_style, context, template_pack=template_pack, **kwargs)

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/utils.py in render_field(139)
  html = template.render(context)

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/templatetags/crispy_forms_field.py in render(157)
  return str(field)

/home/nathan/rb/site/./lego/models/sets.py in get_all_sorted_choices(252)
  for x in themes:

33 {% include 'bootstrap3/layout/help_text_and_errors.html' %}
34 {% else %}
35 <div class="controls {{ field_class }}">
36 {% crispy_field field %}
37 {% include 'bootstrap3/layout/help_text_and_errors.html' %}
38 </div>
39 {% endif %}
40 {% endif %}

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/templates/bootstrap3/field.html

SELECT "lego_theme"."id",
       "lego_theme"."parent_id",
       "lego_theme"."name",
       "lego_theme"."slug",
       "lego_theme"."set_count",
       "lego_theme"."t1_id",
       "lego_theme"."t1_name",
       "lego_theme"."t2_name",
       "lego_theme"."t3_name",
       "lego_theme"."lego_blurb",
       "lego_theme"."banner_img",
       "lego_theme"."descr",
       T2."id",
       T2."parent_id",
       T2."name",
       T2."slug",
       T2."set_count",
       T2."t1_id",
       T2."t1_name",
       T2."t2_name",
       T2."t3_name",
       T2."lego_blurb",
       T2."banner_img",
       T2."descr",
       T3."id",
       T3."parent_id",
       T3."name",
       T3."slug",
       T3."set_count",
       T3."t1_id",
       T3."t1_name",
       T3."t2_name",
       T3."t3_name",
       T3."lego_blurb",
       T3."banner_img",
       T3."descr"
  FROM
"lego_theme"
  LEFT OUTER JOIN
"lego_theme" T2
    ON
("lego_theme"."parent_id" = T2."id")
  LEFT OUTER JOIN
"lego_theme" T3
    ON
(T2."parent_id" = T3."id")
 ORDER BY
"lego_theme"."t1_name" ASC, "lego_theme"."t2_name" ASC, "lego_theme"."t3_name" ASC
SELECT ••• FROM "lego_theme" LEFT OUTER JOIN "lego_theme" T2 ON ("lego_theme"."parent_id" = T2."id") LEFT OUTER JOIN "lego_theme" T3 ON (T2."parent_id" = T3."id") ORDER BY "lego_theme"."t1_name" ASC, "lego_theme"."t2_name" ASC, "lego_theme"."t3_name" ASC
2 similar queries. Duplicated 2 times.
1.08

Connection: default

Transaction status: Idle

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

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/templatetags/crispy_forms_tags.py in render(204)
  c = self.get_render(context).flatten()

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/templatetags/crispy_forms_tags.py in get_render(120)
  actual_form.form_html = helper.render_layout(

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/helper.py in render_layout(301)
  html = self.layout.render(form, self.form_style, context, template_pack=template_pack)

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/layout.py in render(135)
  return self.get_rendered_fields(form, form_style, context, template_pack, **kwargs)

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/layout.py in get_rendered_fields(96)
  return "".join(

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/layout.py in <genexpr>(97)
  render_field(field, form, form_style, context, template_pack=template_pack, **kwargs)

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/utils.py in render_field(66)
  return field.render(form, form_style, context, template_pack=template_pack)

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/layout.py in render(367)
  fields = self.get_rendered_fields(form, form_style, context, template_pack, **kwargs)

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/layout.py in get_rendered_fields(96)
  return "".join(

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/layout.py in <genexpr>(97)
  render_field(field, form, form_style, context, template_pack=template_pack, **kwargs)

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/utils.py in render_field(66)
  return field.render(form, form_style, context, template_pack=template_pack)

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/layout.py in render(457)
  return self.get_rendered_fields(

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/layout.py in get_rendered_fields(96)
  return "".join(

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/layout.py in <genexpr>(97)
  render_field(field, form, form_style, context, template_pack=template_pack, **kwargs)

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/utils.py in render_field(139)
  html = template.render(context)

/home/nathan/venv_rb310/lib/python3.10/site-packages/crispy_forms/templatetags/crispy_forms_field.py in render(157)
  return str(field)

/home/nathan/rb/site/./lego/models/sets.py in get_all_sorted_choices(252)
  for x in themes:

SELECT "lego_mocimage"."id",
       "lego_mocimage"."moc_id",
       "lego_mocimage"."is_primary",
       "lego_mocimage"."file_extension"
  FROM
"lego_mocimage"
 WHERE
"lego_mocimage"."id" = 2194
 LIMIT
21
SELECT ••• FROM "lego_mocimage" WHERE "lego_mocimage"."id" = 2194 LIMIT 21
2 similar queries.
0.21

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_moc(78)
  return render_to_string('sets/render_set.html', {'set': set,

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

42 {# Image #}
43 <div class="rb-card__image {% if set.is_figure %} js-hover-card{% endif %}" {% if set.is_figure %}data-hover="{% url 'minfig_hover' set.set_num %}"{% endif %}>
44 <a href="{{ set.get_absolute_url }}{% if inventory and not set.is_moc %}?inventory={{ inventory.version }}{% endif %}">
45 {% if not set.img_dir and set.is_figure %}
46 {% include 'lego/includes/render_set_img.html' with img_file='nil_mf.jpg' tn_options=tn_options %}
47 {% else %}
48 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=tn_options %}
49 {% endif %}

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

SELECT "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" = 332251)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 332251) LIMIT 21
2 similar queries.
0.37

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_moc(78)
  return render_to_string('sets/render_set.html', {'set': set,

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

88 <div class="moc-author trunc mb-6 size-12">
89 {% if set|get_class == 'Moc' %}
90 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
91 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
92 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
93 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
94 {% elif set.moc and set.moc.designer.username %}
95 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

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

SELECT "lego_mocimage"."id",
       "lego_mocimage"."moc_id",
       "lego_mocimage"."is_primary",
       "lego_mocimage"."file_extension"
  FROM
"lego_mocimage"
 WHERE
"lego_mocimage"."id" = 843753
 LIMIT
21
SELECT ••• FROM "lego_mocimage" WHERE "lego_mocimage"."id" = 843753 LIMIT 21
2 similar queries.
0.25

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_moc(78)
  return render_to_string('sets/render_set.html', {'set': set,

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

42 {# Image #}
43 <div class="rb-card__image {% if set.is_figure %} js-hover-card{% endif %}" {% if set.is_figure %}data-hover="{% url 'minfig_hover' set.set_num %}"{% endif %}>
44 <a href="{{ set.get_absolute_url }}{% if inventory and not set.is_moc %}?inventory={{ inventory.version }}{% endif %}">
45 {% if not set.img_dir and set.is_figure %}
46 {% include 'lego/includes/render_set_img.html' with img_file='nil_mf.jpg' tn_options=tn_options %}
47 {% else %}
48 {% include 'lego/includes/render_set_img.html' with img_file=set.img_dir tn_options=tn_options %}
49 {% endif %}

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

SELECT "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" = 920703)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 920703) LIMIT 21
2 similar queries.
0.27

Connection: default

Transaction status: Idle

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

/home/nathan/rb/site/./lego/templatetags/sets/drawing.py in render_moc(78)
  return render_to_string('sets/render_set.html', {'set': set,

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

88 <div class="moc-author trunc mb-6 size-12">
89 {% if set|get_class == 'Moc' %}
90 By <a href="{% url 'user_mocs' set.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.designer.username %}">{{ set.designer.username }}</a>
91 {% if not set.designer.plan.is_free and set.designer.to_proxy.is_public_plan %}{{ set.designer.to_proxy.get_plan_html }}{% endif %}
92 {% elif set|get_class == 'PendingMoc' and set.pendingmoc %}
93 By <a href="{% url 'user_mocs' set.pendingmoc.designer.username %}" class="js-hover-card" data-hover="{% url 'user_card' set.pendingmoc.designer.username %}">{{ set.pendingmoc.designer.username }}</a>
94 {% elif set.moc and set.moc.designer.username %}
95 By <a href="{% url 'user_mocs' set.moc.designer.username %}">{{ set.moc.designer.username }}</a>

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

Log messages

No messages logged.