django-planet

What's new in Django community blogs?

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

You can now use 'pip' to install Tailwind CSS. Node.js is no longer required!

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

I recently released pytailwindcss, a Python package that lets you install the Tailwind CSS executable via pip with just one command: pip install pytailwindcss After the installation is complete, use the terminal to run the tailwindcss command: tailwindcss Behind the scenes, it runs a standalone Tailwind CSS build that … Read now

Read More

Django Dev Made Easy: How to Run Multiple Processes Simultaneously

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

As a Django developer, I have to run multiple processes while developing, such as the Django server, a JavaScript compiler, and Celery. Launching these processes separately can be time-consuming and tedious. Just try opening three terminal windows, and you'll understand what I mean. Finally, I found a solution … Read now

Read More