django-planet

What's new in Django community blogs?

Time Travel with django-simple-history

March 14, 2023 » Django on Matt Layman » [Archived Version]

If you’re interested in Django development, you might have come across the django-simple-history package. It’s a great tool that can help you keep track of changes made to your models over time. In this article, we’ll take a closer look at django-simple-history and how it can benefit your projects. What is django-simple-history? django-simple-history is a third-party Django package that provides version control for your models. It allows you to keep track of changes made to yo…

Read More

A 'No JS' Solution for Dynamic Search in Django

March 13, 2023 » Django Beats » [Archived Version]

In this post we take advantage of HTMX requests to do partial rendering for list views in Django. Django on Fly.io is pretty sweet! Check it out: you can be up and running on Fly.io in just minutes. 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 most is the fact that - for a minimal Django setu…

Read More

Introducing Django ClearCache 🤠🧹💰 - allows to clear cache via admin UI or command line

March 12, 2023 » timonweb.com » [Archived Version]

I've been working with the Django cache recently. And while Django has exceptional caching capabilities, I was surprised to find out that it doesn't provide a simple way to manually clear a cache. I checked online and found a couple of clear cache packages for Django, but all of them … Read now

Read More

How to sort Django admin list column by a value from a related model

March 12, 2023 » timonweb.com » [Archived Version]

Here's a real-life case. On this blog, I have two models: Post and PostStats. As you may have already guessed, the first is for posts and the second is for statistics on each post, such as the number of views. Here is a simplified version of both models: models.py … Read now

Read More

How to remove 'rich-text' div from RichTextBlock template output in Wagtail CMS

March 12, 2023 » timonweb.com » [Archived Version]

When Wagtail renders RichTextBlock in a template, it by default wraps the contents of the block with the <div class="rich-text">. The resulting markup may look like this: <div class="rich-text"> <p>I'm a paragraph that's cold, so I'm wrapped up</p> </ … Read now

Read More

Installing Tailwind CSS v2 with Django-Tailwind

March 12, 2023 » timonweb.com » [Archived Version]

Recently, there have been loads of tutorials on how to integrate Tailwind CSS and Django. There are several different ways you could do this, from the simplistic "let's include a link from CDN" to "roll-up your sleeves and dive into the Webpack black hole." I've been working with Tailwind … Read now

Read More

Django Tailwind v2.0 is out. It brings the "JIT" mode and hot reloading.

March 12, 2023 » timonweb.com » [Archived Version]

I'm pleased to announce the release of the Django Tailwind v2.0. Django Tailwind is an integration package for Tailwind CSS and Django. Its goal is to make your life easier without having to think much about the frontend tooling configuration. With the help of the package, you generate … Read now

Read More

Django-Tailwind v2.2 is out

March 12, 2023 » timonweb.com » [Archived Version]

Today I'm officially announcing the release of Django-Tailwind v2.2. It was soft-launched last week, and since I haven't got any complaints, I think I'm good to let you all know about the release. The current update adds improved support for the latest 2.2 version of the Tailwind CSS framework. … Read now

Read More

How to run a local Django development server over HTTPS with a trusted self-signed SSL certificate

March 12, 2023 » timonweb.com » [Archived Version]

Generating a self-signed SSL certificate for local Django development has always been a hassle for me. Until the day I discovered mkcert, a zero-config tool that creates locally trusted development certificates, your browser will not complain about. In this tutorial, I'll share my process, and you'll learn how to … Read now

Read More

Django-Tailwind with support for the latest Tailwind CSS v3 is out

March 12, 2023 » timonweb.com » [Archived Version]

Yesterday, as I was about to go to bed, I found out that Tailwind CSS 3.0 with lots of cool improvements had been released. Knowing that a lot of Django people adore Tailwind CSS so much, I decided I couldn't sleep until I upgraded Django-Tailwind to support the latest version … Read now

Read More