Recent Comments

  • Avatar image for Rebrickable user aamartin0000
    4 months, 3 weeks ago aamartin0000 Level 14
    Insane!  Have you actually built this?

    If my understanding is correct, a level 4 would be 20 of these…

Silicon Valley, USA

There are 1 users from this location

DJDT

Time

Resource usage

Resource Value
User CPU time 189.453 msec
System CPU time 4.878 msec
Total CPU time 194.331 msec
Elapsed time 209.363 msec
Context switches 91 voluntary, 2 involuntary

Browser timing

Timing attribute Timeline Milliseconds since navigation start (+length)

SQL queries from 1 connection

  • default 15.59 ms (40 queries including 30 similar and 25 duplicates )
Query Timeline Time (ms) Action
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",
       "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"
  FROM
"auth_user"
  LEFT OUTER JOIN
"accounts_userplan"
    ON
("auth_user"."id" = "accounts_userplan"."user_id")
 WHERE
("auth_user"."is_active" AND "auth_user"."username" = 'aamartin0000')
 LIMIT
21
SELECT ••• FROM "auth_user" LEFT OUTER JOIN "accounts_userplan" ON ("auth_user"."id" = "accounts_userplan"."user_id") WHERE ("auth_user"."is_active" AND "auth_user"."username" = 'aamartin0000') LIMIT 21
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/./accounts/views/profile.py in user_profile(327)
  profile_user = get_object_or_404(ProxyUser, username=username)

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 (362775)
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 (362775)
2 similar queries. Duplicated 2 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/./accounts/views/profile.py in user_profile(327)
  profile_user = get_object_or_404(ProxyUser, username=username)

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" = 362775
 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" = 362775 LIMIT 21
6 similar queries. Duplicated 6 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/./accounts/views/profile.py in user_profile(343)
  context['designer_ga_tracking_id'] = profile_user.designer.get_ga_tracking_id()

SELECT "accounts_userprofilesection"."id",
       "accounts_userprofilesection"."user_id",
       "accounts_userprofilesection"."section",
       "accounts_userprofilesection"."order",
       "accounts_userprofilesection"."options"
  FROM
"accounts_userprofilesection"
 WHERE
"accounts_userprofilesection"."user_id" = 362775
 ORDER BY
"accounts_userprofilesection"."order" ASC
SELECT ••• FROM "accounts_userprofilesection" WHERE "accounts_userprofilesection"."user_id" = 362775 ORDER BY "accounts_userprofilesection"."order" ASC
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/./accounts/views/profile.py in user_profile(351)
  if len(context['sections']) == 0:

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" = 362775
 LIMIT
21
SELECT ••• FROM "auth_user" WHERE "auth_user"."id" = 362775 LIMIT 21
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/./accounts/views/profile.py in user_profile(357)
  context.update(section.get_context(request, profile_user))

/home/nathan/rb/site/./accounts/models/users.py in get_context(1882)
  badges = UserBadge.objects.filter(user=self.user).order_by('badge__num_users')[:6]

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" = 362775)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 362775) LIMIT 21
4 similar queries. Duplicated 4 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/./accounts/views/profile.py in user_profile(357)
  context.update(section.get_context(request, profile_user))

/home/nathan/rb/site/./accounts/models/users.py in get_context(1884)
  is_public_badges = user.get_privacy_option('is_public_badges')

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

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

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")
 INNER 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
(NOT "django_comments"."is_removed" AND "django_comments"."user_id" = 362775)
 ORDER BY
"django_comments"."submit_date" DESC
 LIMIT
5
SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") INNER 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 (NOT "django_comments"."is_removed" AND "django_comments"."user_id" = 362775) ORDER BY "django_comments"."submit_date" DESC LIMIT 5
11.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/./accounts/views/profile.py in user_profile(357)
  context.update(section.get_context(request, profile_user))

/home/nathan/rb/site/./accounts/models/users.py in get_context(1833)
  return {'comments': (comments, len(comments))}

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 (362775)
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 (362775)
2 similar queries. Duplicated 2 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/./accounts/views/profile.py in user_profile(357)
  context.update(section.get_context(request, profile_user))

/home/nathan/rb/site/./accounts/models/users.py in get_context(1833)
  return {'comments': (comments, len(comments))}

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.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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.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(252)
  country = Country.objects.get(iso=country_code)

412 </a>
413 </li>
414 <li class="hidden-xs">
415 {% geo_currency request.user %}
416 </li>
417 {% comment %}
418 <li class="hidden-xs hidden-sm">
419 <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/base_root.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" = 362775
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 362775 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
7 similar queries. Duplicated 7 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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.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]

4 <div class="visible-xs user-mobile-menu mb-30">
5 <div class="mb-10">
6 <a href="{% url 'user_profile' profile_user.username %}">
7 <img id="user_profile_avatar" src="{% avatar_url profile_user 75 %}" class="avatar mr-10" width="50px" height="50px">
8 {{ profile_user.username }}
9 </a>
10
11 {% if request.user.is_authenticated and request.user != profile_user %}

/home/nathan/rb/site/accounts/templates/accounts/includes/user_profile_mobile_menu.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" = 362775)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 362775) LIMIT 21
4 similar queries. Duplicated 4 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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

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

16 <div class="container">
17 {% include 'accounts/includes/user_profile_mobile_menu.html' %}
18 <div class="row">
19 {% with profile_user.get_privacy_options as privacy_options %}
20 {% include "accounts/includes/user_profile_navbar.html" %}
21
22 <div class="col-lg-9 col-md-9 col-sm-8 mb-80">
23

/home/nathan/rb/site/accounts/templates/accounts/user_profile.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" = 362775)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 362775) LIMIT 21
4 similar queries. Duplicated 4 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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

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

11
12 <!-- Left column - navigation -->
13 <div class="col-lg-3 col-md-3 col-sm-4 hidden-xs">
14 {% with profile_user.get_privacy_options as privacy_options %}
15 {% include 'accounts/includes/user_profile_navbar_card.html' %}
16
17 <div class="hidden-xs">
18 {% include 'accounts/includes/user_profile_navbar_location.html' %}

/home/nathan/rb/site/accounts/templates/accounts/includes/user_profile_navbar.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" = 362775)
 LIMIT
21
SELECT ••• FROM "accounts_usersetting" WHERE ("accounts_usersetting"."name" = 'privacy' AND "accounts_usersetting"."user_id" = 362775) LIMIT 21
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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

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

7 {% url 'add_profile_avatar' request.user.get_username as url %}
8 {% include 'lego/includes/get_img_url_modal.html' with url=url %}
9
10 {% with profile_user.get_privacy_options as privacy_options %}
11 <div class="text-center pt-3 border-1 mb-20">
12 <a href="{% url 'user_profile' profile_user.username %}">
13 <img id="user_profile_avatar" src="{% avatar_url profile_user 150 %}" class="avatar" width="150px" height="150px">
14 </a>

/home/nathan/rb/site/accounts/templates/accounts/includes/user_profile_navbar_card.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" = 362775
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 362775 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
7 similar queries. Duplicated 7 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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.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]

10 {% with profile_user.get_privacy_options as privacy_options %}
11 <div class="text-center pt-3 border-1 mb-20">
12 <a href="{% url 'user_profile' profile_user.username %}">
13 <img id="user_profile_avatar" src="{% avatar_url profile_user 150 %}" class="avatar" width="150px" height="150px">
14 </a>
15
16 {% if request.user == profile_user %}
17 <div class="js-load_user_avatar" data-modal="#change_avatar_modal"

/home/nathan/rb/site/accounts/templates/accounts/includes/user_profile_navbar_card.html

SELECT "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
"accounts_userprofile"
 WHERE
"accounts_userprofile"."user_id" = 362775
 LIMIT
21
SELECT ••• FROM "accounts_userprofile" WHERE "accounts_userprofile"."user_id" = 362775 LIMIT 21
0.14

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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.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)

52 {% endwith %}
53 {% endif %}
54
55 {% if profile_user.profile.trophy_badge.badge and privacy_options.is_public_badges %}
56 <a href="{% url 'badges' %}#{{ profile_user.profile.trophy_badge.badge.code }}">
57 <div class="text-center" style="margin:auto">
58 {% render_badge profile_user.profile.trophy_badge.badge %}
59 </div>

/home/nathan/rb/site/accounts/templates/accounts/includes/user_profile_navbar_card.html

SELECT "accounts_userbadge"."id",
       "accounts_userbadge"."user_id",
       "accounts_userbadge"."badge_id"
  FROM
"accounts_userbadge"
 WHERE
"accounts_userbadge"."id" = 1270903
 LIMIT
21
SELECT ••• FROM "accounts_userbadge" WHERE "accounts_userbadge"."id" = 1270903 LIMIT 21
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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

52 {% endwith %}
53 {% endif %}
54
55 {% if profile_user.profile.trophy_badge.badge and privacy_options.is_public_badges %}
56 <a href="{% url 'badges' %}#{{ profile_user.profile.trophy_badge.badge.code }}">
57 <div class="text-center" style="margin:auto">
58 {% render_badge profile_user.profile.trophy_badge.badge %}
59 </div>

/home/nathan/rb/site/accounts/templates/accounts/includes/user_profile_navbar_card.html

SELECT "lego_badge"."id",
       "lego_badge"."code",
       "lego_badge"."level",
       "lego_badge"."name",
       "lego_badge"."descr",
       "lego_badge"."num_users"
  FROM
"lego_badge"
 WHERE
"lego_badge"."id" = 45
 LIMIT
21
SELECT ••• FROM "lego_badge" WHERE "lego_badge"."id" = 45 LIMIT 21
7 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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

52 {% endwith %}
53 {% endif %}
54
55 {% if profile_user.profile.trophy_badge.badge and privacy_options.is_public_badges %}
56 <a href="{% url 'badges' %}#{{ profile_user.profile.trophy_badge.badge.code }}">
57 <div class="text-center" style="margin:auto">
58 {% render_badge profile_user.profile.trophy_badge.badge %}
59 </div>

/home/nathan/rb/site/accounts/templates/accounts/includes/user_profile_navbar_card.html

SELECT COUNT(*) AS "__count"
  FROM
"accounts_userprofile"
 WHERE
UPPER("accounts_userprofile"."location"::text) = UPPER('Silicon Valley, USA')
SELECT ••• FROM "accounts_userprofile" WHERE UPPER("accounts_userprofile"."location"::text) = UPPER('Silicon Valley, USA')
2 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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_num_users_at_location(594)
  return UserProfile.objects.filter(location__iexact=self.profile.location).count()

5 <div class="mb-30 border box-light">
6 <div class="box-inner">
7 <h4 class="mb-0"><i class="fa fa-globe"></i> {{ profile_user.profile.location }}</h4>
8 <p><small>There are {{ profile_user.get_num_users_at_location }} users from this location</small></p>
9
10 {% if profile_user.profile.website_url and profile_user.level >= settings.LEVEL_SHOW_PERSONAL_URL %}
11 <div class="trunc"><a href="{% get_external_url profile_user.profile.website_url 'action=ProfileLink&site=Personal'|addstr:'&user='|addstr:profile_user.id %}" target="_blank" rel="nofollow"><i class="fa fa-external-link"></i> {{ profile_user.profile.website_url }}</a></div>
12 {% endif %}

/home/nathan/rb/site/accounts/templates/accounts/includes/user_profile_navbar_location.html

SELECT COUNT(*) AS "__count"
  FROM
"accounts_usertrophy"
 WHERE
"accounts_usertrophy"."user_id" = 362775
SELECT ••• FROM "accounts_usertrophy" WHERE "accounts_usertrophy"."user_id" = 362775
2 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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

1 {% if profile_user.trophies.count > 0 %}
2 <div class="mb-30 border box-light">
3 <div class="box-inner">
4 <h4><i class="fa fa-trophy"></i> TROPHY CASE</h4>
5 {% for trophy in profile_user.trophies.all %}

/home/nathan/rb/site/accounts/templates/accounts/includes/user_profile_navbar_trophy.html

SELECT "accounts_userstats"."id",
       "accounts_userstats"."user_id",
       "accounts_userstats"."num_profile_views",
       "accounts_userstats"."num_shopper_scans",
       "accounts_userstats"."total_is_stale",
       "accounts_userstats"."total_sets",
       "accounts_userstats"."total_loose_parts",
       "accounts_userstats"."total_lost_set_parts",
       "accounts_userstats"."total_figures",
       "accounts_userstats"."total_all_parts"
  FROM
"accounts_userstats"
 WHERE
"accounts_userstats"."user_id" = 362775
 LIMIT
21
SELECT ••• FROM "accounts_userstats" WHERE "accounts_userstats"."user_id" = 362775 LIMIT 21
0.12

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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.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)

137 </div>
138
139 <div class="col-xs-6 col-condensed text-center bold">
140 <h3 class="mt-10 mb-0 text-info">{{ profile_user.stats.num_profile_views|intcomma }}</h3>
141 <h4 class="size-11 mt-0 mb-10">VIEWS</h4>
142 </div>
143 </div>
144

/home/nathan/rb/site/accounts/templates/accounts/includes/user_profile_navbar.html

SELECT "accounts_userrank"."user_id",
       "accounts_userrank"."rank_points",
       "accounts_userrank"."rank_parts",
       "accounts_userrank"."rank_views"
  FROM
"accounts_userrank"
 WHERE
"accounts_userrank"."user_id" = 362775
 LIMIT
21
SELECT ••• FROM "accounts_userrank" WHERE "accounts_userrank"."user_id" = 362775 LIMIT 21
0.08

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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.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)

142 </div>
143 </div>
144
145 {% if profile_user.rank.rank_views > 0 or profile_user.rank.rank_points > 0 %}
146 <div class="box-inner mb-20 hidden-xs">
147 <h2><i class="fa fa-line-chart"></i> USER RANKINGS</h2>
148 {% if profile_user.rank.rank_points > 0 %}
149 <div class="row row-condensed" title="Number of Points (Rank 1 = highest)">

/home/nathan/rb/site/accounts/templates/accounts/includes/user_profile_navbar.html

SELECT "accounts_userbadge"."id",
       "accounts_userbadge"."user_id",
       "accounts_userbadge"."badge_id"
  FROM
"accounts_userbadge"
 INNER JOIN
"lego_badge"
    ON
("accounts_userbadge"."badge_id" = "lego_badge"."id")
 WHERE
"accounts_userbadge"."user_id" = 362775
 ORDER BY
"lego_badge"."num_users" ASC
 LIMIT
6
SELECT ••• FROM "accounts_userbadge" INNER JOIN "lego_badge" ON ("accounts_userbadge"."badge_id" = "lego_badge"."id") WHERE "accounts_userbadge"."user_id" = 362775 ORDER BY "lego_badge"."num_users" ASC LIMIT 6
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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

10 {% include 'accounts/includes/user_profile_section_menu.html' %}
11 </div>
12 {% if is_public_badges %}
13 {% if best_badges|length > 0 %}
14 <div class="row row-condensed">
15 {% for badge in best_badges %}
16 <div class="col-xs-6 col-sm-3 col-md-2 col-condensed {% if forloop.counter > 4 %}hidden-sm hidden-xs{% endif %}">
17 <a href="{% url 'badges' %}#{{ badge.badge.code }}">

/home/nathan/rb/site/accounts/templates/accounts/includes/user_profile_section_badges.html

SELECT "lego_badge"."id",
       "lego_badge"."code",
       "lego_badge"."level",
       "lego_badge"."name",
       "lego_badge"."descr",
       "lego_badge"."num_users"
  FROM
"lego_badge"
 WHERE
"lego_badge"."id" = 45
 LIMIT
21
SELECT ••• FROM "lego_badge" WHERE "lego_badge"."id" = 45 LIMIT 21
7 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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

14 <div class="row row-condensed">
15 {% for badge in best_badges %}
16 <div class="col-xs-6 col-sm-3 col-md-2 col-condensed {% if forloop.counter > 4 %}hidden-sm hidden-xs{% endif %}">
17 <a href="{% url 'badges' %}#{{ badge.badge.code }}">
18 {% render_badge badge.badge %}
19 </a>
20 </div>
21 {% endfor %}

/home/nathan/rb/site/accounts/templates/accounts/includes/user_profile_section_badges.html

SELECT "lego_badge"."id",
       "lego_badge"."code",
       "lego_badge"."level",
       "lego_badge"."name",
       "lego_badge"."descr",
       "lego_badge"."num_users"
  FROM
"lego_badge"
 WHERE
"lego_badge"."id" = 46
 LIMIT
21
SELECT ••• FROM "lego_badge" WHERE "lego_badge"."id" = 46 LIMIT 21
7 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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

14 <div class="row row-condensed">
15 {% for badge in best_badges %}
16 <div class="col-xs-6 col-sm-3 col-md-2 col-condensed {% if forloop.counter > 4 %}hidden-sm hidden-xs{% endif %}">
17 <a href="{% url 'badges' %}#{{ badge.badge.code }}">
18 {% render_badge badge.badge %}
19 </a>
20 </div>
21 {% endfor %}

/home/nathan/rb/site/accounts/templates/accounts/includes/user_profile_section_badges.html

SELECT "lego_badge"."id",
       "lego_badge"."code",
       "lego_badge"."level",
       "lego_badge"."name",
       "lego_badge"."descr",
       "lego_badge"."num_users"
  FROM
"lego_badge"
 WHERE
"lego_badge"."id" = 60
 LIMIT
21
SELECT ••• FROM "lego_badge" WHERE "lego_badge"."id" = 60 LIMIT 21
7 similar queries.
0.06

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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

14 <div class="row row-condensed">
15 {% for badge in best_badges %}
16 <div class="col-xs-6 col-sm-3 col-md-2 col-condensed {% if forloop.counter > 4 %}hidden-sm hidden-xs{% endif %}">
17 <a href="{% url 'badges' %}#{{ badge.badge.code }}">
18 {% render_badge badge.badge %}
19 </a>
20 </div>
21 {% endfor %}

/home/nathan/rb/site/accounts/templates/accounts/includes/user_profile_section_badges.html

SELECT "lego_badge"."id",
       "lego_badge"."code",
       "lego_badge"."level",
       "lego_badge"."name",
       "lego_badge"."descr",
       "lego_badge"."num_users"
  FROM
"lego_badge"
 WHERE
"lego_badge"."id" = 62
 LIMIT
21
SELECT ••• FROM "lego_badge" WHERE "lego_badge"."id" = 62 LIMIT 21
7 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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

14 <div class="row row-condensed">
15 {% for badge in best_badges %}
16 <div class="col-xs-6 col-sm-3 col-md-2 col-condensed {% if forloop.counter > 4 %}hidden-sm hidden-xs{% endif %}">
17 <a href="{% url 'badges' %}#{{ badge.badge.code }}">
18 {% render_badge badge.badge %}
19 </a>
20 </div>
21 {% endfor %}

/home/nathan/rb/site/accounts/templates/accounts/includes/user_profile_section_badges.html

SELECT "lego_badge"."id",
       "lego_badge"."code",
       "lego_badge"."level",
       "lego_badge"."name",
       "lego_badge"."descr",
       "lego_badge"."num_users"
  FROM
"lego_badge"
 WHERE
"lego_badge"."id" = 33
 LIMIT
21
SELECT ••• FROM "lego_badge" WHERE "lego_badge"."id" = 33 LIMIT 21
7 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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

14 <div class="row row-condensed">
15 {% for badge in best_badges %}
16 <div class="col-xs-6 col-sm-3 col-md-2 col-condensed {% if forloop.counter > 4 %}hidden-sm hidden-xs{% endif %}">
17 <a href="{% url 'badges' %}#{{ badge.badge.code }}">
18 {% render_badge badge.badge %}
19 </a>
20 </div>
21 {% endfor %}

/home/nathan/rb/site/accounts/templates/accounts/includes/user_profile_section_badges.html

SELECT "lego_badge"."id",
       "lego_badge"."code",
       "lego_badge"."level",
       "lego_badge"."name",
       "lego_badge"."descr",
       "lego_badge"."num_users"
  FROM
"lego_badge"
 WHERE
"lego_badge"."id" = 27
 LIMIT
21
SELECT ••• FROM "lego_badge" WHERE "lego_badge"."id" = 27 LIMIT 21
7 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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

14 <div class="row row-condensed">
15 {% for badge in best_badges %}
16 <div class="col-xs-6 col-sm-3 col-md-2 col-condensed {% if forloop.counter > 4 %}hidden-sm hidden-xs{% endif %}">
17 <a href="{% url 'badges' %}#{{ badge.badge.code }}">
18 {% render_badge badge.badge %}
19 </a>
20 </div>
21 {% endfor %}

/home/nathan/rb/site/accounts/templates/accounts/includes/user_profile_section_badges.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" = 362775
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 362775 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
7 similar queries. Duplicated 7 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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

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

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

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

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

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

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 362775
 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" = 362775 LIMIT 21
6 similar queries. Duplicated 6 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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

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

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

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

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 362775
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 362775 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
7 similar queries. Duplicated 7 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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

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

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

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

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

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

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 362775
 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" = 362775 LIMIT 21
6 similar queries. Duplicated 6 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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

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

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

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

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 362775
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 362775 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
7 similar queries. Duplicated 7 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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

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

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

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

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

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

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 362775
 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" = 362775 LIMIT 21
6 similar queries. Duplicated 6 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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

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

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

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

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 362775
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 362775 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
7 similar queries. Duplicated 7 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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

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

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

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

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

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

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 362775
 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" = 362775 LIMIT 21
6 similar queries. Duplicated 6 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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

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

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

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

SELECT "avatar_avatar"."id",
       "avatar_avatar"."user_id",
       "avatar_avatar"."primary",
       "avatar_avatar"."avatar",
       "avatar_avatar"."date_uploaded"
  FROM
"avatar_avatar"
 WHERE
"avatar_avatar"."user_id" = 362775
 ORDER BY
"avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC
 LIMIT
1
SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 362775 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1
7 similar queries. Duplicated 7 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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

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

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

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

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

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

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined",
       "lego_designer"."user_ptr_id",
       "lego_designer"."auto_approve",
       "lego_designer"."num_auto_approved",
       "lego_designer"."last_checked_for_moc_errors"
  FROM
"lego_designer"
 INNER JOIN
"auth_user"
    ON
("lego_designer"."user_ptr_id" = "auth_user"."id")
 WHERE
"lego_designer"."user_ptr_id" = 362775
 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" = 362775 LIMIT 21
6 similar queries. Duplicated 6 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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

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

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

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

SELECT COUNT(*) AS "__count"
  FROM
"accounts_userprofile"
 WHERE
UPPER("accounts_userprofile"."location"::text) = UPPER('Silicon Valley, USA')
SELECT ••• FROM "accounts_userprofile" WHERE UPPER("accounts_userprofile"."location"::text) = UPPER('Silicon Valley, USA')
2 similar queries. Duplicated 2 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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

/home/nathan/rb/site/./accounts/models/user_extras.py in get_num_users_at_location(594)
  return UserProfile.objects.filter(location__iexact=self.profile.location).count()

5 <div class="mb-30 border box-light">
6 <div class="box-inner">
7 <h4 class="mb-0"><i class="fa fa-globe"></i> {{ profile_user.profile.location }}</h4>
8 <p><small>There are {{ profile_user.get_num_users_at_location }} users from this location</small></p>
9
10 {% if profile_user.profile.website_url and profile_user.level >= settings.LEVEL_SHOW_PERSONAL_URL %}
11 <div class="trunc"><a href="{% get_external_url profile_user.profile.website_url 'action=ProfileLink&site=Personal'|addstr:'&user='|addstr:profile_user.id %}" target="_blank" rel="nofollow"><i class="fa fa-external-link"></i> {{ profile_user.profile.website_url }}</a></div>
12 {% endif %}

/home/nathan/rb/site/accounts/templates/accounts/includes/user_profile_navbar_location.html

SELECT COUNT(*) AS "__count"
  FROM
"accounts_usertrophy"
 WHERE
"accounts_usertrophy"."user_id" = 362775
SELECT ••• FROM "accounts_usertrophy" WHERE "accounts_usertrophy"."user_id" = 362775
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/./accounts/views/profile.py in user_profile(358)
  return render(request, 'accounts/user_profile.html', context)

1 {% if profile_user.trophies.count > 0 %}
2 <div class="mb-30 border box-light">
3 <div class="box-inner">
4 <h4><i class="fa fa-trophy"></i> TROPHY CASE</h4>
5 {% for trophy in profile_user.trophies.all %}

/home/nathan/rb/site/accounts/templates/accounts/includes/user_profile_navbar_trophy.html

Log messages

No messages logged.