django-planet

Feed: Django Beats

The home for Django-oriented content on Fly.io.

Blog Django Beats
RSS 2.0 Feed Django Beats
web https://fly.io/django-beats/
Last Update11.20.2024
Posts16

ASGI deployment options for Django

March 27, 2024 » Django Beats » [Archived Version]

Mariusz Felisiak, a Django and Python contributor and a Django Fellow, explores the world of ASGI servers. Django on Fly.io is pretty sweet! Check it out: you can be up and running on Fly.io in just minutes. Asynchronous support in Django is constantly improving and each version introduces new features. With already implemented: asynchronous views and middlewares, asynchronous ORM interface, asynchronous support for decorators and signal dispatchers, and growing support in contrib packages…

Read More

Shedding light on Django versioning

Jan. 30, 2024 » Django Beats » [Archived Version]

Mariusz Felisiak, a Django and Python contributor and a Django Fellow, sheds light on Django versioning and release cycle. Django on Fly.io is pretty sweet! Check it out: you can be up and running on Fly.io in just minutes. 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: What we can exp…

Read More

Django Views as Serverless Functions on Fly Machines

Jan. 10, 2024 » Django Beats » [Archived Version]

In this post, we demonstrate how to use Fly Machines to run Django Views as Serverless Functions. Django on Fly.io is pretty sweet! Check it out: you can be up and running on Fly.io in just minutes. 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’s understand some concepts …

Read More

Staging environments on the Fly with GitHub actions

Jan. 4, 2024 » Django Beats » [Archived Version]

Mariusz Felisiak, a Django and Python contributor and a Django Fellow, explores how to create staging environments on the Fly.io with GitHub actions. Django on Fly.io is pretty sweet! Check it out: you can be up and running on Fly.io in just minutes. 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 …

Read More

Serverless Functions in Django With Fly Machines

Nov. 23, 2023 » Django Beats » [Archived Version]

In this post we demonstrate how to use Fly Machines to run Serverless Functions using Django custom commands. Django on Fly.io is pretty sweet! Check it out: you can be up and running on Fly.io in just minutes. 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 - and we like that! The cloud…

Read More

New goodies in Django 5.0

Nov. 14, 2023 » Django Beats » [Archived Version]

Mariusz Felisiak, a Django and Python contributor and a Django Fellow, shares with us his personal favorites from a “deluge” of exciting new features in Django 5.0. Django on Fly.io is pretty sweet! Check it out: you can be up and running on Fly.io in just minutes. 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 effort…

Read More

Smooth Database Changes in Blue-Green Deployments

Sept. 14, 2023 » Django Beats » [Archived Version]

Mariusz Felisiak, a Django and Python contributor and a Django Fellow, explores how to make smooth blue-green deployments using advanced migration tools. Django on Fly.io is pretty sweet! Check it out: you can be up and running on Fly.io in just minutes. 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. B…

Read More

Celery Async Tasks on Fly Machines

Aug. 22, 2023 » Django Beats » [Archived Version]

In this post we offload the work from our application and run async tasks using Celery workers on Fly Machines. Django on Fly.io is pretty sweet! Check it out: you can be up and running on Fly.io in just minutes. 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 to name a few. However,…

Read More

Organizing Database Queries: Managers vs. QuerySets

July 3, 2023 » Django Beats » [Archived Version]

In this article Mariusz Felisiak introduces concepts of Django’s Managers and QuerySet to organize common database queries. Django on Fly.io is pretty sweet! Check it out: you can be up and running on Fly.io in just minutes. 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 organize d…

Read More

QuerySets are Lazy

June 28, 2023 » Django Beats » [Archived Version]

In this article we explore the lazy QuerySets in Django. Django on Fly.io is pretty sweet! Check it out: you can be up and running on Fly.io in just minutes. 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 QuerySets? 💭 When you perform operations on a QuerySet, such as applyin…

Read More