The LEGO PoweredUp system was introduced in 2017 as the successor of the PowerFunctions system. The system is centered around smart battery boxes known as hubs, featuring a BlueTooth connectivity, making it possible to connect them to apps on your mobile devices for full control of your LEGO models. Separate themes like City Trains, Technic, BOOST, Mindstorms and SPIKE all have their own type of hub and all were given an accompanying app to control official LEGO models. There is also one app to rule them all: The LEGO PoweredUp app features a block-coding system to create your own controls for your MOCs. I was very happy when this system came out: the possibilities seem endless!
But there are some drawbacks. For starters, the system seems very complicated. With the old PowerFunctions, you connect the motor to the battery box, flip the switch, and you're done. Nice and simple, but it also makes it limited in usage. The PoweredUp system has many more components with many more options, but not all of them work together flawlessly, especially when using a theme-specific app. The LEGO PoweredUp app has the ability to control most of the components together, but that can be tricky to comprehend. The app is void from documentation, so understanding which coding block does what can be very confusing for regular customers. On top of that, the app was updated last year without an announcement, replacing most icons of the coding blocks for new ones. So even for experienced programmers the system is far from intuitive. Another major downside is that in order for the app to work, the hubs need a constant connection to the mobile device and the app. If the connection is lost, so is all functionality. This is already annoying when playing with a model, but for instance continuous running a display model or train layout gets frustrating fast. And most importantly for MOC designers wanting to share their programs on Rebrickable: there is no easy way to export your program and upload it to the instruction section of your MOC. You can add screenshots, but builders will need to recreate the program block by block.
There are a lot of third-party apps available, like The Brick Automation Project, Scratch and Brickcontroller II which are more user-friendly, but still require a constant connection. And this is where PyBricks come in. Some systems like Mindstorms Robot Inventor allow users to add custom code to their projects in the app in the form of Micropython, a slimmed down version of the scripting language Python. This allows for more flexible coding outside of the pre-programmed coding blocks found in the app. But it still requires the app to get the code into the hub and run it, using the LEGO firmware inside the hub.
Pybricks takes it a big step further: instead of using an app, you can write your own code on your computer in regular Python and load it directly into the hub, bypassing the LEGO firmware. Once loaded into the hub, you can run the program fully independent of any mobile devices, apps or other equipment. Since the firmware is bypassed, the program also runs a lot faster and can be bigger than what's possible through the apps. The programs are stored as standard .py files used by Python, which are basically a sort of txt files that you can easily share and import in your own hub. This sounds amazing, so I figured it is worth taking a closer look.
Setup of this Blog
Before I begin, some background on my 'level of expertise': I have some experience working with Python, as I made a personal, locally hosted website with admin tools and a collection-tracker using the Django framework. The scripts for these tools are pretty basic though, with a simple linear setup: gather data -> process that data -> present the result in a report, which in my case usually means a table on a webpage. It mostly involves reading csv files and doing some API calls. Programming a robot seems to be a bit more complicated, as they usually don't operate linearly: there is constant information coming in from sensors, controllers and other hubs that needs to be processed in real-time. So for me this is mostly new territory in a somewhat familiar universe.
Browsing through the documentation and examples found on Pybricks.com, it quickly becomes clear the system is pretty extensive and can seem daunting for people with little experience in PoweredUp, robotics, or programming in general. Seeing as I'm no expert myself, my goal for this blog is to give you a sort of introduction: I'm not diving deep into all the details and won't be discussing every single option Pybricks provides, nor show complicated programs. Instead, I'll try to show you how to get started, give you an idea of the (basics of the) functions, and give some examples of simple programs. Basically, I want to see for myself if I can figure out the system, and take you along for the ride. And if I can succeed at this, probably so can you! So this will also be a test of how accessible the system is for noobs.
Who made Pybricks?
We send this question to the Pybricks team, and this was their answer:
Pybricks was created by Laurens Valk (Netherlands) and David Lechner (USA), both long-time Mindstorms fans. Laurens previously wrote several Mindstorms books, while David is well known for creating the ev3dev operating system that unlocks the power of the Mindstorms EV3 brick.
When LEGO Boost was launched in 2017 as the first installment of what looked to be a whole new LEGO platform, Laurens and David immediately realized the potential of this new platform, and joined forces to create the ultimate coding and play experience for it. This platform is now known as Powered Up, and includes LEGO City, LEGO Boost, LEGO Technic, LEGO Mindstorms Robot Inventor, and LEGO Education Spike.
Even though these LEGO themes all look very different, they use the same technology on the inside. This means that everything can work together, and everything should "just work". At least, that's the theory! Unfortunately, each LEGO theme requires a separate mobile phone app that has to be connected all the time, and you are often restricted to the predesigned play experiences that come in the box. Mixing elements often does not work, because the apps are incompatible.
In the spirit of being creative with LEGO, Laurens and David went to work to fix this. They created a unified solution for the entire platform, while leveraging the capabilities of each programmable LEGO hub far beyond the out-of-the box experience. Even trains and Technic vehicles can run their own little programs now, which was previously reserved only for Mindstorms. This means kids can play without their phones too.
Pybricks is free and open source, with a growing community of users worldwide. This also means that it can be used far into the future, even as the official LEGO apps get discontinued, which has already happened for Boost and Mindstorms. Some Pybricks features like block-based coding can be unlocked with a donation or purchase, which is a great way to support this huge project and its creators.
Each LEGO hub can be controlled with either MicroPython or block-based programming. You can also just load many pre-existing projects if coding is not your cup of tea. All of the motors and sensors work across the hubs, and you can even make the hubs work together wirelessly. You can also use the LEGO train remote or even the Microsoft Xbox Controller for additional possibilities and control.
Once you've loaded Pybricks onto your LEGO hubs, your imagination is the only limit, as it should be!
Getting Started
The best way to get a better idea of how Pybricks works, is by writing some code. To do so, we go to pybricks.com, and select Code in the upper menu. This brings us to the coding console:
This console is web based and requires an internet connection. Under the gear symbol on the left is a link to install the Pybricks app. This app can function without an active internet connection. The first thing we need to do is to prepare the hub by installing the Pybricks firmware. That sounds complicated, but it's just a matter of following the onscreen steps. Again under the gear symbol, we find the option Install Pybricks Firmware. Here, we select the type of hub we want to install the firmware on. After accepting the license terms and conditions, we have the option to name the hub. The final step is activating the hub and putting it in update mode. This simply means keeping the green button pressed until it starts blinking purple. Then, a 4 minute wait while the firmware is loaded, and the hub is ready for Pybricks. This process overwrites the official LEGO firmware, but there is a similar process available to restore the hub to the original version.
Now we can start coding! Hit the small paper on the left to open your list of programs. This list will be empty when you start, so hit the + to create a new program. There are 2 ways to write your code: Python or blocks. Coding with Python means you write out all the code using the Python scripting language. This option is free to use, so I'll show this one first.
After selecting the type of hub the code will be placed on, a new file is created and the first bit of code importing all needed libraries is nicely filled in for us. The rest is up to us. from pybricks.hubs import InventorHub from pybricks.pupdevices import Motor, ColorSensor, UltrasonicSensor from pybricks.parameters import Button, Color, Direction, Port, Side, Stop from pybricks.robotics import DriveBase from pybricks.tools import wait, StopWatch
hub = InventorHub() As you can see, the hub is already set up for us, named 'hub'. Now, we need to tell the hub which components are connected to it. In this case, we have a motor called 'motor' connected to port A, and a colorsensor named 'see_color' on port E. While typing out this code, the system offers suggestions to guide you.
hub = InventorHub()
motor = Motor(Port.A)
see_color = ColorSensor(Port.E) Next, we start an infinite While loop that will keep looping until we shut down the program. In each loop, we check if the color sensor detects a color. Using an If-statement, we can set the speed of the motor based on the scanned color. I've added comments to the code, shown in Green, to explain what is going on. from pybricks.hubs import InventorHub from pybricks.pupdevices import Motor, ColorSensor, UltrasonicSensor from pybricks.parameters import Button, Color, Direction, Port, Side, Stop from pybricks.robotics import DriveBase from pybricks.tools import wait, StopWatch
hub = InventorHub()
motor = Motor(Port.A)
see_color = ColorSensor(Port.E) # Loop this piece of code until we hit the power button while True: # If the color sensor sees the color green, we set the motor to run at speed 500 if see_color.color()== Color.GREEN: motor.run(500) # Else, if the color sensor sees the color blue, we set the motor to run at speed -500 # With a negative speed, the motor spins in the other direction elif see_color.color()== Color.BLUE: motor.run(-500) # Else, if the color sensor sees the color red, the motor will stop (speed=0) elif see_color.color()== Color.RED: motor.run(0) With the program ready, we can import it into the hub. For this, hit the Bluetooth icon. The app will start searching for available hubs. Select the right hub (which you can give a convenient name when installing the Pybricks firmware for easy recognition) and the hub gets connected. Now hit the play button, the program gets imported in the hub and you're ready to go! When the hub is still connected to the app, you can start the program here, but you can also start the program by pressing the button on the hub, even when the app is not connected.
Let's see how that turned out:
So, preparing the hub and loading the program is pretty simple. But I can understand the coding can get overwhelming, especially if you have no experience writing it. It seems there is a lot of stuff going on, and this is just an entry-level script. In order to check the color seen by the sensor, you need to know the right syntaxes to write it in code. Luckily there is documentation available, providing examples and describing all syntaxes for all components, guiding you through the learning process. If writing code is still not your cup of tea, there is an alternative. In November 2023, Pybricks introduced coding bricks. Instead of writing, you select blocks that build the program for you. This function is not free, and can be unlocked by either subscribing to the Pybricks Patreon for €5.-/month, or purchasing a license. An individual license for life is €58.08, and other plans for students, schools, teams etc are available as well. For this blog, I went for the monthly subscription. The blocks are similar to the ones found in the various LEGO apps and Scratch. I've made the same program as before, now build out of blocks:
In the top section we find the setup. We have the Inventor Hub, a motor connected to A, with the standard direction set to clock-wise. This direction can be flipped, for instance when 2 motors need to perform the same movement but mirrored. And the color sensor is connected to port E. Under the setup we find the program itself. The light orange bracket is the While-loop, repeating until we terminate the program. Inside we find the If-statement in orange. The first if checks if sensor see_color sees the color green. If so, the speed of motor is set to 500. Else if see_color sees blue, the speed is set to -500, and else if see_color sees red, the speed is set to 0. Note that when using blocks, you can open a split screen. On the left you see the blocks that you can drag around. On the left appears the corresponding Python code in realtime, so everytime you make a change in the blocks, the Python code is updated as well. If you prefer coding in Python over blocks (like me), this gives you a great way to learn all syntaxes. Just play around with the blocks, and see how it affects the code, teaching you how to write it yourself. At the bottom you see another split screen with a black background. Here, potential error messages will appear, as well as prints you can add to the code. This can come in handy when working out bugs in your program or when you need data, like the position of a motor or the exact reading from a color sensor.
Now, this is a rather simple program. Based on the color, a single line of code is executed: set the speed of the motor. These executions can become much more elaborate. And in some cases, the same execution can be needed somewhere else in the program. Writing the same bit of code multiple times is a big nono in the programming world. This can be solved by creating functions: a separate piece of code that can be called upon whenever it's needed. Because it is kept outside of the main program, it keeps the structure of the main program neat and tidy. Functions can be used in both the Python coding and using the blocks, where they are called Tasks. Staying with our previous program, this would look as follows:
Most has stayed the same, but there are 3 new sections on the right. These are the Tasks or functions. Each task sets the motor to a different speed. In the If-statement, we can see the tasks being called based on the color. Now, in this example, using functions/tasks are pretty much overkill and can make the program more confusing. But in more complex programs, it can help keep the original If-statement clean and easier to read.
As with Python functions, Tasks can take information with them from the program, and return new information back to the program.
Get Moving
Let's take what we've learned so far and make a simple walking robot. In the following program we have the Inventor hub, with 4 motors and a color sensor connected. MotorA and MotorC are on the right side of the walker. MotorB and MotorD are on the other side, and because they are flipped around, their standard rotation direction is also flipped. There are 4 tasks, seen on the right. Green rotates all motors in the same direction, making the walker move forward. Blue reverses the rotation and moves the walker backwards. Yellow turns the motors on the left forward, and on the right backward, spinning the walker around. And again, red stops the fun. When the program starts by pressing the main button on the hub, all motors are set to an angle of 0deg. Then the loop starts, checking for colors. Based on the color, a task is performed.
Let's see that in action:
To be continued
As you can see, Pybricks is an easy way to control your PoweredUp components. But so far I've only shown a basic program using a single hub, controlled by components directly connected to it. Stay tuned for part 2 where we'll play with remotes, hub-2-hub communication and trains.
default
1025.33 ms (40 queries
including 31 similar
and 6 duplicates
)
Query
Timeline
Time (ms)
Action
SELECT "blog_article"."id", "blog_article"."title", "blog_article"."author_id", "blog_article"."published_date", "blog_article"."is_active", "blog_article"."body", "blog_article"."meta_description", "blog_article"."meta_img", "blog_article"."slug", "blog_article"."category_id", "blog_article"."ads", "blog_article"."show_ads_for_set_num", "blog_article"."review_for_set_num", "blog_article"."status", "blog_article"."scheduled_net", "blog_article"."ready_for_review_date", "blog_article"."is_sensitive", "blog_article"."search_vector" FROM "blog_article" WHERE ("blog_article"."is_active" AND "blog_article"."id" = 700) LIMIT 21SELECT ••• FROM "blog_article" WHERE ("blog_article"."is_active" AND "blog_article"."id" = 700) LIMIT 21
9 similar queries.
0.43
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(119)
article = get_object_or_404(Article, id=article_id)
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", (SIMILARITY("blog_article"."title", 'Powering Up PoweredUp with Pybricks - Part 1') + SIMILARITY("blog_article"."body", 'Contents:
IntroductionSetup of this BlogWho made Pybricks?Getting StartedGet Moving
Introduction
The LEGO PoweredUp system was introduced in 2017 as the successor of the PowerFunctions system. The system is centered around smart battery boxes known as hubs, featuring a BlueTooth connectivity, making it possible to connect them to apps on your mobile devices for full control of your LEGO models. Separate themes like City Trains, Technic, BOOST, Mindstorms and SPIKE all have their own type of hub and all were given an accompanying app to control official LEGO models. There is also one app to rule them all: The LEGO PoweredUp app features a block-coding system to create your own controls for your MOCs. I was very happy when this system came out: the possibilities seem endless!
But there are some drawbacks. For starters, the system seems very complicated. With the old PowerFunctions, you connect the motor to the battery box, flip the switch, and you''re done. Nice and simple, but it also makes it limited in usage. The PoweredUp system has many more components with many more options, but not all of them work together flawlessly, especially when using a theme-specific app. The LEGO PoweredUp app has the ability to control most of the components together, but that can be tricky to comprehend. The app is void from documentation, so understanding which coding block does what can be very confusing for regular customers. On top of that, the app was updated last year without an announcement, replacing most icons of the coding blocks for new ones. So even for experienced programmers the system is far from intuitive. Another major downside is that in order for the app to work, the hubs need a constant connection to the mobile device and the app. If the connection is lost, so is all functionality. This is already annoying when playing with a model, but for instance continuous running a display model or train layout gets frustrating fast. And most importantly for MOC designers wanting to share their programs on Rebrickable: there is no easy way to export your program and upload it to the instruction section of your MOC. You can add screenshots, but builders will need to recreate the program block by block.
There are a lot of third-party apps available, like The Brick Automation Project, Scratch and Brickcontroller II which are more user-friendly, but still require a constant connection. And this is where PyBricks come in. Some systems like Mindstorms Robot Inventor allow users to add custom code to their projects in the app in the form of Micropython, a slimmed down version of the scripting language Python. This allows for more flexible coding outside of the pre-programmed coding blocks found in the app. But it still requires the app to get the code into the hub and run it, using the LEGO firmware inside the hub.
Pybricks takes it a big step further: instead of using an app, you can write your own code on your computer in regular Python and load it directly into the hub, bypassing the LEGO firmware. Once loaded into the hub, you can run the program fully independent of any mobile devices, apps or other equipment. Since the firmware is bypassed, the program also runs a lot faster and can be bigger than what''s possible through the apps. The programs are stored as standard .py files used by Python, which are basically a sort of txt files that you can easily share and import in your own hub. This sounds amazing, so I figured it is worth taking a closer look.
Setup of this Blog
Before I begin, some background on my ''level of expertise'': I have some experience working with Python, as I made a personal, locally hosted website with admin tools and a collection-tracker using the Django framework. The scripts for these tools are pretty basic though, with a simple linear setup: gather data -> process that data -> present the result in a report, which in my case usually means a table on a webpage. It mostly involves reading csv files and doing some API calls. Programming a robot seems to be a bit more complicated, as they usually don''t operate linearly: there is constant information coming in from sensors, controllers and other hubs that needs to be processed in real-time. So for me this is mostly new territory in a somewhat familiar universe.
Browsing through the documentation and examples found on Pybricks.com, it quickly becomes clear the system is pretty extensive and can seem daunting for people with little experience in PoweredUp, robotics, or programming in general. Seeing as I''m no expert myself, my goal for this blog is to give you a sort of introduction: I''m not diving deep into all the details and won''t be discussing every single option Pybricks provides, nor show complicated programs. Instead, I''ll try to show you how to get started, give you an idea of the (basics of the) functions, and give some examples of simple programs. Basically, I want to see for myself if I can figure out the system, and take you along for the ride. And if I can succeed at this, probably so can you! So this will also be a test of how accessible the system is for noobs.
Who made Pybricks?
We send this question to the Pybricks team, and this was their answer:
Pybricks was created by Laurens Valk (Netherlands) and David Lechner (USA), both long-time Mindstorms fans. Laurens previously wrote several Mindstorms books, while David is well known for creating the ev3dev operating system that unlocks the power of the Mindstorms EV3 brick.When LEGO Boost was launched in 2017 as the first installment of what looked to be a whole new LEGO platform, Laurens and David immediately realized the potential of this new platform, and joined forces to create the ultimate coding and play experience for it. This platform is now known as Powered Up, and includes LEGO City, LEGO Boost, LEGO Technic, LEGO Mindstorms Robot Inventor, and LEGO Education Spike.Even though these LEGO themes all look very different, they use the same technology on the inside. This means that everything can work together, and everything should "just work". At least, that''s the theory! Unfortunately, each LEGO theme requires a separate mobile phone app that has to be connected all the time, and you are often restricted to the predesigned play experiences that come in the box. Mixing elements often does not work, because the apps are incompatible.In the spirit of being creative with LEGO, Laurens and David went to work to fix thi')) AS "similarity", "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" LEFT OUTER JOIN "auth_user" ON ("blog_article"."author_id" = "auth_user"."id") WHERE ("blog_article"."is_active" AND "blog_article"."published_date" > '2023-11-17T00:27:34.674085+00:00'::timestamptz ANDNOT ("blog_article"."id" = 700)) ORDER BY 19 DESC, "blog_article"."published_date" DESC LIMIT 20SELECT "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", (SIMILARITY("blog_article"."title", 'Powering Up PoweredUp with Pybricks - Part 1') + SIMILARITY("blog_article"."body", 'Contents:
IntroductionSetup of this BlogWho made Pybricks?Getting StartedGet Moving
Introduction
The LEGO PoweredUp system was introduced in 2017 as the successor of the PowerFunctions system. The system is centered around smart battery boxes known as hubs, featuring a BlueTooth connectivity, making it possible to connect them to apps on your mobile devices for full control of your LEGO models. Separate themes like City Trains, Technic, BOOST, Mindstorms and SPIKE all have their own type of hub and all were given an accompanying app to control official LEGO models. There is also one app to rule them all: The LEGO PoweredUp app features a block-coding system to create your own controls for your MOCs. I was very happy when this system came out: the possibilities seem endless!
But there are some drawbacks. For starters, the system seems very complicated. With the old PowerFunctions, you connect the motor to the battery box, flip the switch, and you''re done. Nice and simple, but it also makes it limited in usage. The PoweredUp system has many more components with many more options, but not all of them work together flawlessly, especially when using a theme-specific app. The LEGO PoweredUp app has the ability to control most of the components together, but that can be tricky to comprehend. The app is void from documentation, so understanding which coding block does what can be very confusing for regular customers. On top of that, the app was updated last year without an announcement, replacing most icons of the coding blocks for new ones. So even for experienced programmers the system is far from intuitive. Another major downside is that in order for the app to work, the hubs need a constant connection to the mobile device and the app. If the connection is lost, so is all functionality. This is already annoying when playing with a model, but for instance continuous running a display model or train layout gets frustrating fast. And most importantly for MOC designers wanting to share their programs on Rebrickable: there is no easy way to export your program and upload it to the instruction section of your MOC. You can add screenshots, but builders will need to recreate the program block by block.
There are a lot of third-party apps available, like The Brick Automation Project, Scratch and Brickcontroller II which are more user-friendly, but still require a constant connection. And this is where PyBricks come in. Some systems like Mindstorms Robot Inventor allow users to add custom code to their projects in the app in the form of Micropython, a slimmed down version of the scripting language Python. This allows for more flexible coding outside of the pre-programmed coding blocks found in the app. But it still requires the app to get the code into the hub and run it, using the LEGO firmware inside the hub.
Pybricks takes it a big step further: instead of using an app, you can write your own code on your computer in regular Python and load it directly into the hub, bypassing the LEGO firmware. Once loaded into the hub, you can run the program fully independent of any mobile devices, apps or other equipment. Since the firmware is bypassed, the program also runs a lot faster and can be bigger than what''s possible through the apps. The programs are stored as standard .py files used by Python, which are basically a sort of txt files that you can easily share and import in your own hub. This sounds amazing, so I figured it is worth taking a closer look.
Setup of this Blog
Before I begin, some background on my ''level of expertise'': I have some experience working with Python, as I made a personal, locally hosted website with admin tools and a collection-tracker using the Django framework. The scripts for these tools are pretty basic though, with a simple linear setup: gather data -> process that data -> present the result in a report, which in my case usually means a table on a webpage. It mostly involves reading csv files and doing some API calls. Programming a robot seems to be a bit more complicated, as they usually don''t operate linearly: there is constant information coming in from sensors, controllers and other hubs that needs to be processed in real-time. So for me this is mostly new territory in a somewhat familiar universe.
Browsing through the documentation and examples found on Pybricks.com, it quickly becomes clear the system is pretty extensive and can seem daunting for people with little experience in PoweredUp, robotics, or programming in general. Seeing as I''m no expert myself, my goal for this blog is to give you a sort of introduction: I''m not diving deep into all the details and won''t be discussing every single option Pybricks provides, nor show complicated programs. Instead, I''ll try to show you how to get started, give you an idea of the (basics of the) functions, and give some examples of simple programs. Basically, I want to see for myself if I can figure out the system, and take you along for the ride. And if I can succeed at this, probably so can you! So this will also be a test of how accessible the system is for noobs.
Who made Pybricks?
We send this question to the Pybricks team, and this was their answer:
Pybricks was created by Laurens Valk (Netherlands) and David Lechner (USA), both long-time Mindstorms fans. Laurens previously wrote several Mindstorms books, while David is well known for creating the ev3dev operating system that unlocks the power of the Mindstorms EV3 brick.When LEGO Boost was launched in 2017 as the first installment of what looked to be a whole new LEGO platform, Laurens and David immediately realized the potential of this new platform, and joined forces to create the ultimate coding and play experience for it. This platform is now known as Powered Up, and includes LEGO City, LEGO Boost, LEGO Technic, LEGO Mindstorms Robot Inventor, and LEGO Education Spike.Even though these LEGO themes all look very different, they use the same technology on the inside. This means that everything can work together, and everything should "just work". At least, that''s the theory! Unfortunately, each LEGO theme requires a separate mobile phone app that has to be connected all the time, and you are often restricted to the predesigned play experiences that come in the box. Mixing elements often does not work, because the apps are incompatible.In the spirit of being creative with LEGO, Laurens and David went to work to fix thi')) AS "similarity", "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" LEFT OUTER JOIN "auth_user" ON ("blog_article"."author_id" = "auth_user"."id") WHERE ("blog_article"."is_active" AND "blog_article"."published_date" > '2023-11-17T00:27:34.674085+00:00'::timestamptz ANDNOT ("blog_article"."id" = 700)) ORDER BY 19 DESC, "blog_article"."published_date" DESCLIMIT 20
974.65
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(148)
related_articles = article.get_related_articles(num_sidebar_posts)/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_related_articles(289)
return list(Article.objects.select_related('author').filter(published_date__gt=timezone.now()-timedelta(days=365*3)).annotate(similarity=TrigramSimilarity('title', self.title)+TrigramSimilarity('body', body)).exclude(id=self.id).order_by('-similarity', '-published_date')[:num])
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" LEFT OUTER JOIN "auth_user" ON ("blog_article"."author_id" = "auth_user"."id") LEFT OUTER JOIN "blog_articlestats" ON ("blog_article"."id" = "blog_articlestats"."article_id") WHERE ("blog_article"."is_active" AND "blog_article"."published_date" > '2025-11-16T00:27:35.664249+00:00'::timestamptz) ORDER BY "blog_articlestats"."hits" DESC LIMIT 20SELECT ••• FROM "blog_article" LEFT OUTER JOIN "auth_user" ON ("blog_article"."author_id" = "auth_user"."id") LEFT OUTER JOIN "blog_articlestats" ON ("blog_article"."id" = "blog_articlestats"."article_id") WHERE ("blog_article"."is_active" AND "blog_article"."published_date" > '2025-11-16T00:27:35.664249+00:00'::timestamptz) ORDER BY "blog_articlestats"."hits" DESCLIMIT 20
3.14
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(149)
popular_articles = Article.get_popular_articles(num_sidebar_posts)/home/nathan/rb/site/./cache/utils.py in cache_wrapper(101)
caches[cache_key].set(method_key, result, seconds)/home/nathan/venv_rb310/lib/python3.10/site-packages/pymemcache/client/hash.py in set(344)
return self._run_cmd("set", key, False, *args, **kwargs)/home/nathan/venv_rb310/lib/python3.10/site-packages/pymemcache/client/hash.py in _run_cmd(322)
return self._safely_run_func(client, func, default_val, *args, **kwargs)/home/nathan/venv_rb310/lib/python3.10/site-packages/pymemcache/client/hash.py in _safely_run_func(211)
result = func(*args, **kwargs)/home/nathan/venv_rb310/lib/python3.10/site-packages/pymemcache/client/base.py in set(1424)
return client.set(key, value, expire=expire, noreply=noreply, flags=flags)/home/nathan/venv_rb310/lib/python3.10/site-packages/pymemcache/client/base.py in set(475)
return self._store_cmd(b"set", {key: value}, expire, noreply, flags=flags)[key]/home/nathan/venv_rb310/lib/python3.10/site-packages/pymemcache/client/base.py in _store_cmd(1196)
data, data_flags = self.serde.serialize(key, data)/home/nathan/venv_rb310/lib/python3.10/site-packages/pymemcache/serde.py in serialize(119)
return self._serialize_func(key, value)/home/nathan/venv_rb310/lib/python3.10/site-packages/pymemcache/serde.py in _python_memcache_serializer(58)
pickler.dump(value)
SELECT "blog_article"."id", "blog_article"."title", "blog_article"."author_id", "blog_article"."published_date", "blog_article"."is_active", "blog_article"."body", "blog_article"."meta_description", "blog_article"."meta_img", "blog_article"."slug", "blog_article"."category_id", "blog_article"."ads", "blog_article"."show_ads_for_set_num", "blog_article"."review_for_set_num", "blog_article"."status", "blog_article"."scheduled_net", "blog_article"."ready_for_review_date", "blog_article"."is_sensitive", "blog_article"."search_vector" FROM "blog_article" WHERE ("blog_article"."is_active" AND "blog_article"."id" = 646) LIMIT 21SELECT ••• FROM "blog_article" WHERE ("blog_article"."is_active" AND "blog_article"."id" = 646) LIMIT 21
9 similar queries.
0.19
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(150)
article_series_images = get_series()/home/nathan/rb/site/./blog/views.py in get_series(50)
{'name': 'Designer Spotlights', 'tag': 'designer-spotlight', 'article': Article.objects.get(id=646)},
SELECT "blog_article"."id", "blog_article"."title", "blog_article"."author_id", "blog_article"."published_date", "blog_article"."is_active", "blog_article"."body", "blog_article"."meta_description", "blog_article"."meta_img", "blog_article"."slug", "blog_article"."category_id", "blog_article"."ads", "blog_article"."show_ads_for_set_num", "blog_article"."review_for_set_num", "blog_article"."status", "blog_article"."scheduled_net", "blog_article"."ready_for_review_date", "blog_article"."is_sensitive", "blog_article"."search_vector" FROM "blog_article" WHERE ("blog_article"."is_active" AND "blog_article"."id" = 720) LIMIT 21SELECT ••• FROM "blog_article" WHERE ("blog_article"."is_active" AND "blog_article"."id" = 720) LIMIT 21
9 similar queries.
0.29
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(150)
article_series_images = get_series()/home/nathan/rb/site/./blog/views.py in get_series(51)
{'name': 'New Set Releases', 'tag': 'sets', 'article': Article.objects.get(id=720)},
SELECT "blog_article"."id", "blog_article"."title", "blog_article"."author_id", "blog_article"."published_date", "blog_article"."is_active", "blog_article"."body", "blog_article"."meta_description", "blog_article"."meta_img", "blog_article"."slug", "blog_article"."category_id", "blog_article"."ads", "blog_article"."show_ads_for_set_num", "blog_article"."review_for_set_num", "blog_article"."status", "blog_article"."scheduled_net", "blog_article"."ready_for_review_date", "blog_article"."is_sensitive", "blog_article"."search_vector" FROM "blog_article" WHERE ("blog_article"."is_active" AND "blog_article"."id" = 605) LIMIT 21SELECT ••• FROM "blog_article" WHERE ("blog_article"."is_active" AND "blog_article"."id" = 605) LIMIT 21
9 similar queries.
0.18
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(150)
article_series_images = get_series()/home/nathan/rb/site/./blog/views.py in get_series(52)
{'name': 'Into the Archives', 'tag': 'into-the-archives', 'article': Article.objects.get(id=605)},
SELECT "blog_article"."id", "blog_article"."title", "blog_article"."author_id", "blog_article"."published_date", "blog_article"."is_active", "blog_article"."body", "blog_article"."meta_description", "blog_article"."meta_img", "blog_article"."slug", "blog_article"."category_id", "blog_article"."ads", "blog_article"."show_ads_for_set_num", "blog_article"."review_for_set_num", "blog_article"."status", "blog_article"."scheduled_net", "blog_article"."ready_for_review_date", "blog_article"."is_sensitive", "blog_article"."search_vector" FROM "blog_article" WHERE ("blog_article"."is_active" AND "blog_article"."id" = 705) LIMIT 21SELECT ••• FROM "blog_article" WHERE ("blog_article"."is_active" AND "blog_article"."id" = 705) LIMIT 21
9 similar queries.
0.24
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(150)
article_series_images = get_series()/home/nathan/rb/site/./blog/views.py in get_series(53)
{'name': 'Mini MOC Madness', 'tag': 'mini-moc-madness', 'article': Article.objects.get(id=705)},
SELECT "blog_article"."id", "blog_article"."title", "blog_article"."author_id", "blog_article"."published_date", "blog_article"."is_active", "blog_article"."body", "blog_article"."meta_description", "blog_article"."meta_img", "blog_article"."slug", "blog_article"."category_id", "blog_article"."ads", "blog_article"."show_ads_for_set_num", "blog_article"."review_for_set_num", "blog_article"."status", "blog_article"."scheduled_net", "blog_article"."ready_for_review_date", "blog_article"."is_sensitive", "blog_article"."search_vector" FROM "blog_article" WHERE ("blog_article"."is_active" AND "blog_article"."id" = 616) LIMIT 21SELECT ••• FROM "blog_article" WHERE ("blog_article"."is_active" AND "blog_article"."id" = 616) LIMIT 21
9 similar queries.
0.21
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(150)
article_series_images = get_series()/home/nathan/rb/site/./blog/views.py in get_series(54)
{'name': 'Is This LEGO?', 'tag': 'is-this-lego', 'article': Article.objects.get(id=616)},
SELECT "blog_article"."id", "blog_article"."title", "blog_article"."author_id", "blog_article"."published_date", "blog_article"."is_active", "blog_article"."body", "blog_article"."meta_description", "blog_article"."meta_img", "blog_article"."slug", "blog_article"."category_id", "blog_article"."ads", "blog_article"."show_ads_for_set_num", "blog_article"."review_for_set_num", "blog_article"."status", "blog_article"."scheduled_net", "blog_article"."ready_for_review_date", "blog_article"."is_sensitive", "blog_article"."search_vector" FROM "blog_article" WHERE ("blog_article"."is_active" AND "blog_article"."id" = 462) LIMIT 21SELECT ••• FROM "blog_article" WHERE ("blog_article"."is_active" AND "blog_article"."id" = 462) LIMIT 21
9 similar queries.
0.21
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(150)
article_series_images = get_series()/home/nathan/rb/site/./blog/views.py in get_series(55)
{'name': 'Tips & Useful Info', 'tag': 'tips', 'article': Article.objects.get(id=462)},
SELECT "blog_article"."id", "blog_article"."title", "blog_article"."author_id", "blog_article"."published_date", "blog_article"."is_active", "blog_article"."body", "blog_article"."meta_description", "blog_article"."meta_img", "blog_article"."slug", "blog_article"."category_id", "blog_article"."ads", "blog_article"."show_ads_for_set_num", "blog_article"."review_for_set_num", "blog_article"."status", "blog_article"."scheduled_net", "blog_article"."ready_for_review_date", "blog_article"."is_sensitive", "blog_article"."search_vector" FROM "blog_article" WHERE ("blog_article"."is_active" AND "blog_article"."id" = 279) LIMIT 21SELECT ••• FROM "blog_article" WHERE ("blog_article"."is_active" AND "blog_article"."id" = 279) LIMIT 21
9 similar queries.
0.17
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(150)
article_series_images = get_series()/home/nathan/rb/site/./blog/views.py in get_series(56)
{'name': 'Rebricksberg', 'tag': 'rebricksberg', 'article': Article.objects.get(id=279)},
SELECT "blog_article"."id", "blog_article"."title", "blog_article"."author_id", "blog_article"."published_date", "blog_article"."is_active", "blog_article"."body", "blog_article"."meta_description", "blog_article"."meta_img", "blog_article"."slug", "blog_article"."category_id", "blog_article"."ads", "blog_article"."show_ads_for_set_num", "blog_article"."review_for_set_num", "blog_article"."status", "blog_article"."scheduled_net", "blog_article"."ready_for_review_date", "blog_article"."is_sensitive", "blog_article"."search_vector" FROM "blog_article" WHERE ("blog_article"."is_active" AND "blog_article"."id" = 249) LIMIT 21SELECT ••• FROM "blog_article" WHERE ("blog_article"."is_active" AND "blog_article"."id" = 249) LIMIT 21
9 similar queries.
0.13
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(150)
article_series_images = get_series()/home/nathan/rb/site/./blog/views.py in get_series(57)
{'name': 'The Good, The Bad, & The Ugly', 'tag': 'good-bad-ugly', 'article': Article.objects.get(id=249)},
SELECT COUNT(*) AS "__count" 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") WHERE ("blog_article"."is_active" AND UPPER("taggit_tag"."slug"::text) = UPPER('designer-spotlight'))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") WHERE ("blog_article"."is_active" AND UPPER("taggit_tag"."slug"::text) = UPPER('designer-spotlight'))
8 similar queries.
2.64
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(150)
article_series_images = get_series()/home/nathan/rb/site/./blog/views.py in get_series(60)
s['num_posts'] = Article.objects.filter(tags__slug__iexact=s['tag']).count()
SELECT COUNT(*) AS "__count" 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") WHERE ("blog_article"."is_active" AND UPPER("taggit_tag"."slug"::text) = UPPER('sets'))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") WHERE ("blog_article"."is_active" AND UPPER("taggit_tag"."slug"::text) = UPPER('sets'))
8 similar queries.
2.27
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(150)
article_series_images = get_series()/home/nathan/rb/site/./blog/views.py in get_series(60)
s['num_posts'] = Article.objects.filter(tags__slug__iexact=s['tag']).count()
SELECT COUNT(*) AS "__count" 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") WHERE ("blog_article"."is_active" AND UPPER("taggit_tag"."slug"::text) = UPPER('into-the-archives'))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") WHERE ("blog_article"."is_active" AND UPPER("taggit_tag"."slug"::text) = UPPER('into-the-archives'))
8 similar queries.
2.16
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(150)
article_series_images = get_series()/home/nathan/rb/site/./blog/views.py in get_series(60)
s['num_posts'] = Article.objects.filter(tags__slug__iexact=s['tag']).count()
SELECT COUNT(*) AS "__count" 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") WHERE ("blog_article"."is_active" AND UPPER("taggit_tag"."slug"::text) = UPPER('mini-moc-madness'))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") WHERE ("blog_article"."is_active" AND UPPER("taggit_tag"."slug"::text) = UPPER('mini-moc-madness'))
8 similar queries.
2.13
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(150)
article_series_images = get_series()/home/nathan/rb/site/./blog/views.py in get_series(60)
s['num_posts'] = Article.objects.filter(tags__slug__iexact=s['tag']).count()
SELECT COUNT(*) AS "__count" 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") WHERE ("blog_article"."is_active" AND UPPER("taggit_tag"."slug"::text) = UPPER('is-this-lego'))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") WHERE ("blog_article"."is_active" AND UPPER("taggit_tag"."slug"::text) = UPPER('is-this-lego'))
8 similar queries.
2.13
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(150)
article_series_images = get_series()/home/nathan/rb/site/./blog/views.py in get_series(60)
s['num_posts'] = Article.objects.filter(tags__slug__iexact=s['tag']).count()
SELECT COUNT(*) AS "__count" 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") WHERE ("blog_article"."is_active" AND UPPER("taggit_tag"."slug"::text) = UPPER('tips'))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") WHERE ("blog_article"."is_active" AND UPPER("taggit_tag"."slug"::text) = UPPER('tips'))
8 similar queries.
2.15
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(150)
article_series_images = get_series()/home/nathan/rb/site/./blog/views.py in get_series(60)
s['num_posts'] = Article.objects.filter(tags__slug__iexact=s['tag']).count()
SELECT COUNT(*) AS "__count" 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") WHERE ("blog_article"."is_active" AND UPPER("taggit_tag"."slug"::text) = UPPER('rebricksberg'))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") WHERE ("blog_article"."is_active" AND UPPER("taggit_tag"."slug"::text) = UPPER('rebricksberg'))
8 similar queries.
2.14
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(150)
article_series_images = get_series()/home/nathan/rb/site/./blog/views.py in get_series(60)
s['num_posts'] = Article.objects.filter(tags__slug__iexact=s['tag']).count()
SELECT COUNT(*) AS "__count" 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") WHERE ("blog_article"."is_active" AND UPPER("taggit_tag"."slug"::text) = UPPER('good-bad-ugly'))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") WHERE ("blog_article"."is_active" AND UPPER("taggit_tag"."slug"::text) = UPPER('good-bad-ugly'))
8 similar queries.
2.12
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(150)
article_series_images = get_series()/home/nathan/rb/site/./blog/views.py in get_series(60)
s['num_posts'] = Article.objects.filter(tags__slug__iexact=s['tag']).count()
SELECT "blog_article"."id", "blog_article"."title", "blog_article"."author_id", "blog_article"."published_date", "blog_article"."is_active", "blog_article"."body", "blog_article"."meta_description", "blog_article"."meta_img", "blog_article"."slug", "blog_article"."category_id", "blog_article"."ads", "blog_article"."show_ads_for_set_num", "blog_article"."review_for_set_num", "blog_article"."status", "blog_article"."scheduled_net", "blog_article"."ready_for_review_date", "blog_article"."is_sensitive", "blog_article"."search_vector" FROM "blog_article" WHERE ("blog_article"."is_active" AND (("blog_article"."published_date" = '2024-06-22T00:00:00.048262+00:00'::timestamptz AND "blog_article"."id" > 700) OR "blog_article"."published_date" > '2024-06-22T00:00:00.048262+00:00'::timestamptz)) ORDER BY "blog_article"."published_date" ASC, "blog_article"."id" ASC LIMIT 1SELECT ••• FROM "blog_article" WHERE ("blog_article"."is_active" AND (("blog_article"."published_date" = '2024-06-22T00:00:00.048262+00:00'::timestamptz AND "blog_article"."id" > 700) OR "blog_article"."published_date" > '2024-06-22T00:00:00.048262+00:00'::timestamptz)) ORDER BY "blog_article"."published_date" ASC, "blog_article"."id" ASCLIMIT 1
0.36
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(155)
article.next = Article.get_next_by_published_date(article)/usr/lib/python3.10/functools.py in _method(388)
return self.func(cls_or_self, *self.args, *args, **keywords)
SELECT "blog_article"."id", "blog_article"."title", "blog_article"."author_id", "blog_article"."published_date", "blog_article"."is_active", "blog_article"."body", "blog_article"."meta_description", "blog_article"."meta_img", "blog_article"."slug", "blog_article"."category_id", "blog_article"."ads", "blog_article"."show_ads_for_set_num", "blog_article"."review_for_set_num", "blog_article"."status", "blog_article"."scheduled_net", "blog_article"."ready_for_review_date", "blog_article"."is_sensitive", "blog_article"."search_vector" FROM "blog_article" WHERE ("blog_article"."is_active" AND (("blog_article"."published_date" = '2024-06-22T00:00:00.048262+00:00'::timestamptz AND "blog_article"."id" < 700) OR "blog_article"."published_date" < '2024-06-22T00:00:00.048262+00:00'::timestamptz)) ORDER BY "blog_article"."published_date" DESC, "blog_article"."id" DESC LIMIT 1SELECT ••• FROM "blog_article" WHERE ("blog_article"."is_active" AND (("blog_article"."published_date" = '2024-06-22T00:00:00.048262+00:00'::timestamptz AND "blog_article"."id" < 700) OR "blog_article"."published_date" < '2024-06-22T00:00:00.048262+00:00'::timestamptz)) ORDER BY "blog_article"."published_date" DESC, "blog_article"."id" DESCLIMIT 1
0.43
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(159)
article.prev = Article.get_previous_by_published_date(article)/usr/lib/python3.10/functools.py in _method(388)
return self.func(cls_or_self, *self.args, *args, **keywords)
SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined" FROM "auth_user" WHERE "auth_user"."id" = 17788 LIMIT 21SELECT ••• FROM "auth_user" WHERE "auth_user"."id" = 17788 LIMIT 21
0.14
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(209)
return render(request, 'blog/blog_article.html', context)
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 21SELECT ••• FROM "countries_plus_country" WHERE "countries_plus_country"."iso" = 'US' LIMIT 21
0.15
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(209)
return render(request, 'blog/blog_article.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>
SELECT "blog_articlecategory"."id", "blog_articlecategory"."name" FROM "blog_articlecategory" WHERE "blog_articlecategory"."id" = 5 LIMIT 21SELECT ••• FROM "blog_articlecategory" WHERE "blog_articlecategory"."id" = 5 LIMIT 21
0.15
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(209)
return render(request, 'blog/blog_article.html', context)
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"."username" = 'TobyMac' LIMIT 21SELECT ••• FROM "auth_user" WHERE "auth_user"."username" = 'TobyMac' LIMIT 21
2 similar queries.
Duplicated 2 times.
0.13
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(209)
return render(request, 'blog/blog_article.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(112)
user = get_user(user)/home/nathan/rb/site/./avatar/utils.py in get_user(33)
return get_user_model().objects.get_by_natural_key(username)
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" = 17788 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 17788 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESCLIMIT 1
2 similar queries.
Duplicated 2 times.
0.11
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(209)
return render(request, 'blog/blog_article.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]
SELECT COUNT(*) AS "__count" FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE ("django_comments"."content_type_id" = 12 AND "django_comments"."object_pk" = '700' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" ANDNOT "django_comments"."is_removed")SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE ("django_comments"."content_type_id" = 12 AND "django_comments"."object_pk" = '700' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" ANDNOT "django_comments"."is_removed")
2 similar queries.
Duplicated 2 times.
9.26
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(209)
return render(request, 'blog/blog_article.html', context)/home/nathan/venv_rb310/lib/python3.10/site-packages/django_comments/templatetags/comments.py in render(72)
context[self.as_varname] = self.get_context_value_from_queryset(context, qs)/home/nathan/venv_rb310/lib/python3.10/site-packages/threadedcomments/templatetags/threadedcomments_tags.py in get_context_value_from_queryset(116)
return qs.count()
SELECT "blog_articlestats"."article_id", "blog_articlestats"."hits" FROM "blog_articlestats" WHERE "blog_articlestats"."article_id" = 700 LIMIT 21SELECT ••• FROM "blog_articlestats" WHERE "blog_articlestats"."article_id" = 700 LIMIT 21
0.13
Connection: default
Transaction status: In transaction
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(209)
return render(request, 'blog/blog_article.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)
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"."username" = 'TobyMac' LIMIT 21SELECT ••• FROM "auth_user" WHERE "auth_user"."username" = 'TobyMac' LIMIT 21
2 similar queries.
Duplicated 2 times.
0.09
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(209)
return render(request, 'blog/blog_article.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(112)
user = get_user(user)/home/nathan/rb/site/./avatar/utils.py in get_user(33)
return get_user_model().objects.get_by_natural_key(username)
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" = 17788 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESC LIMIT 1SELECT ••• FROM "avatar_avatar" WHERE "avatar_avatar"."user_id" = 17788 ORDER BY "avatar_avatar"."primary" DESC, "avatar_avatar"."date_uploaded" DESCLIMIT 1
2 similar queries.
Duplicated 2 times.
0.10
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(209)
return render(request, 'blog/blog_article.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]
SELECT COUNT(*) AS "__count" FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE ("django_comments"."content_type_id" = 12 AND "django_comments"."object_pk" = '700' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" ANDNOT "django_comments"."is_removed")SELECT ••• FROM "threadedcomments_comment" INNER JOIN "django_comments" ON ("threadedcomments_comment"."comment_ptr_id" = "django_comments"."id") WHERE ("django_comments"."content_type_id" = 12 AND "django_comments"."object_pk" = '700' AND "django_comments"."site_id" = 1 AND "django_comments"."is_public" ANDNOT "django_comments"."is_removed")
2 similar queries.
Duplicated 2 times.
0.33
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(209)
return render(request, 'blog/blog_article.html', context)/home/nathan/venv_rb310/lib/python3.10/site-packages/django_comments/templatetags/comments.py in render(72)
context[self.as_varname] = self.get_context_value_from_queryset(context, qs)/home/nathan/venv_rb310/lib/python3.10/site-packages/threadedcomments/templatetags/threadedcomments_tags.py in get_context_value_from_queryset(116)
return qs.count()
SELECTDISTINCT "taggit_tag"."id", "taggit_tag"."name", "taggit_tag"."slug", COUNT("blog_article"."id") AS "count" FROM "taggit_tag" INNER JOIN "taggit_taggeditem" ON ("taggit_tag"."id" = "taggit_taggeditem"."tag_id") INNER JOIN "django_content_type" ON ("taggit_taggeditem"."content_type_id" = "django_content_type"."id") LEFT OUTER JOIN "blog_article" ON ("taggit_taggeditem"."object_id" = "blog_article"."id" AND ("taggit_taggeditem"."content_type_id" = 12)) INNER JOIN "taggit_taggeditem" T5 ON ("taggit_tag"."id" = T5."tag_id") INNER JOIN "blog_article" T6 ON (T5."object_id" = T6."id" AND (T5."content_type_id" = 12)) WHERE ("django_content_type"."app_label" = 'blog' AND "django_content_type"."model" = 'article' AND T6."id" = 700) GROUP BY "taggit_tag"."id"SELECT ••• FROM "taggit_tag" INNER JOIN "taggit_taggeditem" ON ("taggit_tag"."id" = "taggit_taggeditem"."tag_id") INNER JOIN "django_content_type" ON ("taggit_taggeditem"."content_type_id" = "django_content_type"."id") LEFT OUTER JOIN "blog_article" ON ("taggit_taggeditem"."object_id" = "blog_article"."id" AND ("taggit_taggeditem"."content_type_id" = 12)) INNER JOIN "taggit_taggeditem" T5 ON ("taggit_tag"."id" = T5."tag_id") INNER JOIN "blog_article" T6 ON (T5."object_id" = T6."id" AND (T5."content_type_id" = 12)) WHERE ("django_content_type"."app_label" = 'blog' AND "django_content_type"."model" = 'article' AND T6."id" = 700) GROUP BY "taggit_tag"."id"
2.18
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(209)
return render(request, 'blog/blog_article.html', context)
SELECT (width*height) AS "area", "ads_banner"."id", "ads_banner"."width", "ads_banner"."height", "ads_banner"."start_date", "ads_banner"."end_date", "ads_banner"."country_code", "ads_banner"."html" FROM "ads_banner" WHERE ("ads_banner"."start_date" < '2026-11-16T00:27:35.735696+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-11-16T00:27:35.735771+00:00'::timestamptz OR "ads_banner"."end_date" ISNULL) AND "ads_banner"."height" <= 350 AND "ads_banner"."start_date" < '2026-11-16T00:27:35.735680+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" ISNULLOR "ads_banner"."end_date" > '2026-11-16T00:27:35.735901+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US')SELECT ••• FROM "ads_banner" WHERE ("ads_banner"."start_date" < '2026-11-16T00:27:35.735696+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-11-16T00:27:35.735771+00:00'::timestamptz OR "ads_banner"."end_date" ISNULL) AND "ads_banner"."height" <= 350 AND "ads_banner"."start_date" < '2026-11-16T00:27:35.735680+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" ISNULLOR "ads_banner"."end_date" > '2026-11-16T00:27:35.735901+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US')
4 similar queries.
2.27
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(209)
return render(request, 'blog/blog_article.html', context)/home/nathan/rb/site/./ads/templatetags/ads/drawing.py in render_banner(291)
if not banners:
265
<h4 class="hidden-xs">TAGS</h4>
266
{% include 'blog/includes/render_tags.html' %}
267
268
{% render_banner 262 350 2 %}
269
270
{% include 'blog/includes/render_posts_preview_tabs.html' %}
SELECT (width*height) AS "area", "ads_banner"."id", "ads_banner"."width", "ads_banner"."height", "ads_banner"."start_date", "ads_banner"."end_date", "ads_banner"."country_code", "ads_banner"."html" FROM "ads_banner" WHERE ("ads_banner"."start_date" < '2026-11-16T00:27:35.735696+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-11-16T00:27:35.735771+00:00'::timestamptz OR "ads_banner"."end_date" ISNULL) AND "ads_banner"."height" <= 350 AND "ads_banner"."start_date" < '2026-11-16T00:27:35.735680+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" ISNULLOR "ads_banner"."end_date" > '2026-11-16T00:27:35.735901+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US') ORDER BY 1 DESC, RANDOM() ASC LIMIT 1SELECT ••• FROM "ads_banner" WHERE ("ads_banner"."start_date" < '2026-11-16T00:27:35.735696+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-11-16T00:27:35.735771+00:00'::timestamptz OR "ads_banner"."end_date" ISNULL) AND "ads_banner"."height" <= 350 AND "ads_banner"."start_date" < '2026-11-16T00:27:35.735680+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" ISNULLOR "ads_banner"."end_date" > '2026-11-16T00:27:35.735901+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US') ORDER BY 1 DESC, RANDOM() ASCLIMIT 1
4 similar queries.
1.16
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(209)
return render(request, 'blog/blog_article.html', context)/home/nathan/rb/site/./ads/templatetags/ads/drawing.py in render_banner(298)
banner = banners.order_by('-area', '?')[0]
265
<h4 class="hidden-xs">TAGS</h4>
266
{% include 'blog/includes/render_tags.html' %}
267
268
{% render_banner 262 350 2 %}
269
270
{% include 'blog/includes/render_posts_preview_tabs.html' %}
SELECT (width*height) AS "area", "ads_banner"."id", "ads_banner"."width", "ads_banner"."height", "ads_banner"."start_date", "ads_banner"."end_date", "ads_banner"."country_code", "ads_banner"."html" FROM "ads_banner" WHERE ("ads_banner"."start_date" < '2026-11-16T00:27:35.744884+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-11-16T00:27:35.744953+00:00'::timestamptz OR "ads_banner"."end_date" ISNULL) AND "ads_banner"."height" <= 600 AND "ads_banner"."start_date" < '2026-11-16T00:27:35.744874+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" ISNULLOR "ads_banner"."end_date" > '2026-11-16T00:27:35.745076+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US')SELECT ••• FROM "ads_banner" WHERE ("ads_banner"."start_date" < '2026-11-16T00:27:35.744884+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-11-16T00:27:35.744953+00:00'::timestamptz OR "ads_banner"."end_date" ISNULL) AND "ads_banner"."height" <= 600 AND "ads_banner"."start_date" < '2026-11-16T00:27:35.744874+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" ISNULLOR "ads_banner"."end_date" > '2026-11-16T00:27:35.745076+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US')
4 similar queries.
1.94
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(209)
return render(request, 'blog/blog_article.html', context)/home/nathan/rb/site/./ads/templatetags/ads/drawing.py in render_banner(291)
if not banners:
37
{% include 'blog/includes/render_posts_preview.html' with article=related_article %}
38
</div>
39
{% endfor %}
40
{% render_banner 262 600 5 %}
41
</div>
42
{% endif %}
43
<div id="tab_series" class="tab-pane {% if not related_articles %}active{% endif %}" role="tabpanel">
SELECT (width*height) AS "area", "ads_banner"."id", "ads_banner"."width", "ads_banner"."height", "ads_banner"."start_date", "ads_banner"."end_date", "ads_banner"."country_code", "ads_banner"."html" FROM "ads_banner" WHERE ("ads_banner"."start_date" < '2026-11-16T00:27:35.744884+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-11-16T00:27:35.744953+00:00'::timestamptz OR "ads_banner"."end_date" ISNULL) AND "ads_banner"."height" <= 600 AND "ads_banner"."start_date" < '2026-11-16T00:27:35.744874+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" ISNULLOR "ads_banner"."end_date" > '2026-11-16T00:27:35.745076+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US') ORDER BY 1 DESC, RANDOM() ASC LIMIT 1SELECT ••• FROM "ads_banner" WHERE ("ads_banner"."start_date" < '2026-11-16T00:27:35.744884+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-11-16T00:27:35.744953+00:00'::timestamptz OR "ads_banner"."end_date" ISNULL) AND "ads_banner"."height" <= 600 AND "ads_banner"."start_date" < '2026-11-16T00:27:35.744874+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" ISNULLOR "ads_banner"."end_date" > '2026-11-16T00:27:35.745076+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US') ORDER BY 1 DESC, RANDOM() ASCLIMIT 1
4 similar queries.
1.92
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(209)
return render(request, 'blog/blog_article.html', context)/home/nathan/rb/site/./ads/templatetags/ads/drawing.py in render_banner(298)
banner = banners.order_by('-area', '?')[0]
37
{% include 'blog/includes/render_posts_preview.html' with article=related_article %}
38
</div>
39
{% endfor %}
40
{% render_banner 262 600 5 %}
41
</div>
42
{% endif %}
43
<div id="tab_series" class="tab-pane {% if not related_articles %}active{% endif %}" role="tabpanel">
SELECT (width*height) AS "area", "ads_banner"."id", "ads_banner"."width", "ads_banner"."height", "ads_banner"."start_date", "ads_banner"."end_date", "ads_banner"."country_code", "ads_banner"."html" FROM "ads_banner" WHERE ("ads_banner"."start_date" < '2026-11-16T00:27:35.751000+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-11-16T00:27:35.751094+00:00'::timestamptz OR "ads_banner"."end_date" ISNULL) AND "ads_banner"."height" <= 600 AND "ads_banner"."start_date" < '2026-11-16T00:27:35.750987+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" ISNULLOR "ads_banner"."end_date" > '2026-11-16T00:27:35.751234+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US')SELECT ••• FROM "ads_banner" WHERE ("ads_banner"."start_date" < '2026-11-16T00:27:35.751000+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-11-16T00:27:35.751094+00:00'::timestamptz OR "ads_banner"."end_date" ISNULL) AND "ads_banner"."height" <= 600 AND "ads_banner"."start_date" < '2026-11-16T00:27:35.750987+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" ISNULLOR "ads_banner"."end_date" > '2026-11-16T00:27:35.751234+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US')
4 similar queries.
2.97
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(209)
return render(request, 'blog/blog_article.html', context)/home/nathan/rb/site/./ads/templatetags/ads/drawing.py in render_banner(291)
if not banners:
SELECT (width*height) AS "area", "ads_banner"."id", "ads_banner"."width", "ads_banner"."height", "ads_banner"."start_date", "ads_banner"."end_date", "ads_banner"."country_code", "ads_banner"."html" FROM "ads_banner" WHERE ("ads_banner"."start_date" < '2026-11-16T00:27:35.751000+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-11-16T00:27:35.751094+00:00'::timestamptz OR "ads_banner"."end_date" ISNULL) AND "ads_banner"."height" <= 600 AND "ads_banner"."start_date" < '2026-11-16T00:27:35.750987+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" ISNULLOR "ads_banner"."end_date" > '2026-11-16T00:27:35.751234+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US') ORDER BY 1 DESC, RANDOM() ASC LIMIT 1SELECT ••• FROM "ads_banner" WHERE ("ads_banner"."start_date" < '2026-11-16T00:27:35.751000+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-11-16T00:27:35.751094+00:00'::timestamptz OR "ads_banner"."end_date" ISNULL) AND "ads_banner"."height" <= 600 AND "ads_banner"."start_date" < '2026-11-16T00:27:35.750987+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" ISNULLOR "ads_banner"."end_date" > '2026-11-16T00:27:35.751234+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US') ORDER BY 1 DESC, RANDOM() ASCLIMIT 1
4 similar queries.
1.52
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(209)
return render(request, 'blog/blog_article.html', context)/home/nathan/rb/site/./ads/templatetags/ads/drawing.py in render_banner(298)
banner = banners.order_by('-area', '?')[0]
SELECT (width*height) AS "area", "ads_banner"."id", "ads_banner"."width", "ads_banner"."height", "ads_banner"."start_date", "ads_banner"."end_date", "ads_banner"."country_code", "ads_banner"."html" FROM "ads_banner" WHERE ("ads_banner"."start_date" < '2026-11-16T00:27:35.760891+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-11-16T00:27:35.760975+00:00'::timestamptz OR "ads_banner"."end_date" ISNULL) AND "ads_banner"."height" <= 600 AND "ads_banner"."start_date" < '2026-11-16T00:27:35.760877+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" ISNULLOR "ads_banner"."end_date" > '2026-11-16T00:27:35.761099+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US')SELECT ••• FROM "ads_banner" WHERE ("ads_banner"."start_date" < '2026-11-16T00:27:35.760891+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-11-16T00:27:35.760975+00:00'::timestamptz OR "ads_banner"."end_date" ISNULL) AND "ads_banner"."height" <= 600 AND "ads_banner"."start_date" < '2026-11-16T00:27:35.760877+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" ISNULLOR "ads_banner"."end_date" > '2026-11-16T00:27:35.761099+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US')
4 similar queries.
1.25
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(209)
return render(request, 'blog/blog_article.html', context)/home/nathan/rb/site/./ads/templatetags/ads/drawing.py in render_banner(291)
if not banners:
74
{% include 'blog/includes/render_posts_preview.html' with article=popular_article %}
SELECT (width*height) AS "area", "ads_banner"."id", "ads_banner"."width", "ads_banner"."height", "ads_banner"."start_date", "ads_banner"."end_date", "ads_banner"."country_code", "ads_banner"."html" FROM "ads_banner" WHERE ("ads_banner"."start_date" < '2026-11-16T00:27:35.760891+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-11-16T00:27:35.760975+00:00'::timestamptz OR "ads_banner"."end_date" ISNULL) AND "ads_banner"."height" <= 600 AND "ads_banner"."start_date" < '2026-11-16T00:27:35.760877+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" ISNULLOR "ads_banner"."end_date" > '2026-11-16T00:27:35.761099+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US') ORDER BY 1 DESC, RANDOM() ASC LIMIT 1SELECT ••• FROM "ads_banner" WHERE ("ads_banner"."start_date" < '2026-11-16T00:27:35.760891+00:00'::timestamptz AND ("ads_banner"."end_date" > '2026-11-16T00:27:35.760975+00:00'::timestamptz OR "ads_banner"."end_date" ISNULL) AND "ads_banner"."height" <= 600 AND "ads_banner"."start_date" < '2026-11-16T00:27:35.760877+00:00'::timestamptz AND "ads_banner"."width" <= 262 AND ("ads_banner"."end_date" ISNULLOR "ads_banner"."end_date" > '2026-11-16T00:27:35.761099+00:00'::timestamptz) AND "ads_banner"."country_code" = 'US') ORDER BY 1 DESC, RANDOM() ASCLIMIT 1
4 similar queries.
1.15
Connection: default
Transaction status: Idle
/home/nathan/rb/site/./blog/views.py in blog_article_w_slug(236)
return blog_article(request, article_id)/home/nathan/rb/site/./blog/views.py in blog_article(213)
return cached_blog_article(request, article.id)/home/nathan/rb/site/./rb/views/decorators/auth.py in wrapper(169)
result = view_func(request, *args, **kwargs)/home/nathan/rb/site/./blog/views.py in cached_blog_article(209)
return render(request, 'blog/blog_article.html', context)/home/nathan/rb/site/./ads/templatetags/ads/drawing.py in render_banner(298)
banner = banners.order_by('-area', '?')[0]
74
{% include 'blog/includes/render_posts_preview.html' with article=popular_article %}