Django Beats

Welcome to the home for Django-oriented content on Fly.io.

By Mariusz Felisiak

Shedding light on Django versioning

As of version 2.0 released in 2017, Django uses a loose form of semantic versioning, but what exactly does that mean? This article dives into the details of Django’s release cycle and related policies to answer some on the crucial questions, such as:

Read more
By Kátia Nakamura

Django Views as Serverless Functions on Fly Machines

In my last post, we ran custom Django commands as serverless functions by defining a new process to run within a Machine. This article continues our series transforming our Django views into serverless functions by defining a service. But first, let

Read more
By Mariusz Felisiak

Staging environments on the Fly with GitHub actions

Creating staging environments for testing changes to our apps can be a challenge. This article shows how to use GitHub actions to smoothly create a separate staging environment for each pull request using the fly-pr-review-apps action, which will cre

Read more
By Kátia Nakamura

Serverless Functions in Django With Fly Machines

In the Serverless model, despite the name, there are still servers under the hood. Serverless is a broader concept that encompasses various cloud computing services where we don’t manage the infrastructure. Instead, it’s abstracted away from us - an

Read more
By Mariusz Felisiak

New goodies in Django 5.0

As planned, after 8 months of intensive development, the first alpha and beta versions of Django 5.0 are out! Almost 700 commits were merged to this release. 204 people 💗 and even more unnamed heroes, dedicated their time and efforts to make the firs

Read more
By Mariusz Felisiak

Smooth Database Changes in Blue-Green Deployments

Blue-green deployment is a technique of releasing changes to a project by gradually transferring users to a new version. It provides an isolation between the current “blue” environment and the new “green” environment. Blue nodes are sequentially upgr

Read more
By Kátia Nakamura

Celery Async Tasks on Fly Machines

It’s time… We are finally talking Celery! 🎉 We’ve been discussing about performance improvements: strategies to reduce the load on the database by caching our app and taking advantage of the async support to run tasks concurrently with async views t

Read more
By Mariusz Felisiak

Organizing Database Queries: Managers vs. QuerySets

I’m always focusing on writing readable and maintainable code. When our project becomes bigger and more complex, the number of models and complexity of data access control can increase significantly. We’re starting to ask ourselves questions: How to

Read more
By Kátia Nakamura

QuerySets are Lazy

Did you know that QuerySets are lazy? QuerySets have a hidden gem 💎 called lazy evaluation. It is a powerful feature that allows you to postpone the execution of a database’s query until it’s absolutely necessary. Let’s dive right in. What are Lazy

Read more
By Kátia Nakamura

Caching in Django with Redis

Web servers are math wizards 🧙🏽‍♂️ that can perform complex calculations to build the final - or partial - response that our user sees. Those calculations can vary from expensive queries to the database to rendering the template. For most of small/m

Read more
By Mariusz Felisiak

DRY: Template Rendering with Context Processors

Django has many hidden gems that are neither widely used nor well known. In this article, I will discuss context processors which are one of my favorites. They allow following the DRY (don’t repeat yourself) principle in template rendering and keep y

Read more
By Mariusz Felisiak

Running tasks concurrently in Django asynchronous views

Async support has really been improving and expanding in Django! Since Django 3.0 with the addition of ASGI support (Asynchronous Server Gateway Interface) there has been a steady march of improvements that bring Django closer to having a full asynch

Read more
By Kátia Nakamura

A 'No JS' Solution for Dynamic Search in Django

Django is one of the most used server-side frameworks out there. It uses MTV (Model-Template-View) design pattern to build highly scalable and maintainable apps. Even though Django is a very versatile framework, one of the things that annoys me the

Read more
By Kátia Nakamura

Deploying Django to Production

The first Django app I ever created was a simple Blog back in 2015, during a Django Girls event in Brazil. Ever since then, I’ve created and deployed many other Django applications but the deployment process was never so easy as it was with Fly.io! I

Read more
By Mariusz Felisiak

Standout features in Django 4.2

After 8 months of work by over 200! contributors 💗, the first alpha version of Django 4.2 is out! This is a long-term support release (LTS) with extended support until April 2026, so 3 more years. The final release should be issued in early April

Read more