django-planet

Feed: timonweb.com

Posts.

Blog timonweb.com
RSS 2.0 Feed timonweb.com
web https://timonweb.com/
Last Update05.02.2024
Posts13

How to Use ModelAdmin with Wagtail CMS v6+

May 2, 2024 » timonweb.com » [Archived Version]

The powerful ModelAdmin feature of Wagtail CMS has been removed as of Wagtail v6. The Wagtail team now encourages the use of SnippetViewSet, which includes advanced features like bulk actions. Here is an official migration guide from ModelAdmin to Snippets. However, if you have extensive custom code … Read now

Read More

When PyCharm Deletes Poetry Virtual Environments: The Fix

Feb. 29, 2024 » timonweb.com » [Archived Version]

I use PyCharm as my Python IDE and Poetry for dependency and virtual environment management. However, the magnificent combination of these tools occasionally encounters a weird issue: PyCharm deletes the Poetry virtual environment when you launch the IDE.  Though the problem occurs infrequently, when it does, it leads to a … Read now

Read More

Fixing the "Data for this panel isn't available anymore" error in Django Debug Toolbar

Sept. 19, 2023 » timonweb.com » [Archived Version]

Imagine this: you want to optimize your Django project's page loading times. To do this, you've installed the magnificent Django Debug Toolbar that will provide you with the necessary insight into how many queries your page generates. You click on the SQL panel in the Debug Toolbar, and... you get … Read now

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