django-planet

Feed: timonweb.com

Posts.

Blog timonweb.com
RSS 2.0 Feed timonweb.com
web https://timonweb.com/
Last Update01.29.2025
Posts16

Honored to Become a Member of the Django Software Foundation

Jan. 29, 2025 » timonweb.com » [Archived Version]

I am thrilled to announce my acceptance as an Individual Member of the Django Software Foundation (DSF). This recognition is deeply humbling and reflects the incredible community that has shaped my journey. DSF membership acknowledges substantial contributions to the Django community. Think of it as a virtual “thank-you” card … Read now

Read More

Optimizing Test Execution: Running live_server Tests Last with Pytest

Oct. 8, 2024 » timonweb.com » [Archived Version]

When working with Django applications, it's common to have a mix of fast unit tests and slower end-to-end (E2E) tests that use Pytest's live_server fixture and browser automation tools like Playwright or Selenium. To ensure my test suite runs efficiently, I want to execute the slower tests at … Read now

Read More

How to Remove the “Add” Button from Wagtail Admin SnippetViewSet

Oct. 8, 2024 » timonweb.com » [Archived Version]

From time to time, I encounter scenarios where I want to restrict certain actions, such as adding new instances for a particular model in Wagtail CMS Admin. For example, if I have a ContactFormSubmission model, I don’t want admins to be able to create form submissions manually; that’s what the … Read now

Read More

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