Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Thinking About Risk: An introduction to thinking about risk
Welcome to a new series about how to think about risk. This series is a crash course, a high-level introduction to the most important concepts and risk frameworks. It’s intended for people who encounter risk from time to time and need some basic tools, but don’t want to make a deep study of it. My hope is that it’ll help you better analyze risk when it comes up for you, and also make it easier to navigate conversations with risk professionals. -
Django News - 2024 Malcolm Tredinnick Memorial Prize awarded to Rachell Calhoun - Nov 29th 2024
News 2024 Malcolm Tredinnick Memorial Prize awarded to Rachell Calhoun This year's winner is Rachell Calhoun. Read more about her contributions to Django along with those of her follow nominees. djangoproject.com Django 6.x Steering Council Candidate Registration Registration is open for candidates until December 4, 2024. djangoproject.com 🏷️ Python Black Friday & Cyber Monday sales (2024) The seventh annual compilation of Python learning deals compiled by Trey Hunner. treyhunner.com Django Software Foundation Django Developers Survey 2024 The annual Django Developers Survey is now live! It should take you about 10 minutes to complete and provides a wealth of information to the Django team and community on how Django is actually being used. jetbrains.com DjangoCon Europe 2026 call for organizers completed The DjangoCon Europe 2026 call for organizers is now over. We’re elated to report we received three viable proposals, a clear improvement over recent years. djangoproject.com Updates to Django Today's 'Updates to Django' is presented by Abigail Afi Gbadago from Djangonaut Space! Last week we had 10 pull requests merged into Django by 9 different contributors - including a first-time contributor! Congratulations to Caitlin Hogan for having their first commit merged into Django - welcome on board! 🚀 New in … -
Django: launch pdb in templates with a custom {% breakpoint %} tag
In my recent Boost Your Django DX update, I added a new chapter on debuggers. Here’s an extra technique I didn’t finish in time for the update, but I will include it in the next one. Django templates can be hard to debug, especially to figure out which variables are available after several levels of {% extends %} or {% include %} tags. The template engine doesn’t provide a built-in way tag to open the debugger, but adding one is not much work. Below is a custom template tag that starts debugging with breakpoint(). Find this file in resources.zip as debuggers/party-central/example/templatetags/debugging.py. from django import template register = template.Library() @register.simple_tag(name="breakpoint", takes_context=True) def breakpoint_tag(context): exec("breakpoint()", {}, context.flatten()) The tag uses exec() to populate the debugger’s local variables with all variables from the current context. To set up this tag for convenient use: Copy the file as a template tag library called debugging.py. This should be in an app’s templatetags directory, as described in Django’s custom template tag tutorial. For example, if you have an app called core, copy this code to core/templatetags/debugging.py. Add the debugging library to the builtins option in TEMPLATES: TEMPLATES = [ { "BACKEND": "django.template.backends.django.DjangoTemplates", "DIRS": [BASE_DIR / "example" … -
Python Tooling - Hynek Schlawack
Hynek’s personal websiteVariomediaHynek on YouTube, Mastodon, and GitHubDjangoCon 2008 Keynote by Cal Henderson: Why I Hate Djangoattrs - Python Classes Without Boilerplatesvcs - A Flexible Service Locator for PythonHynek’s 2011 Review, Ticket 6148 and 373Jacob Kaplan-Moss Thread on extending languagesThe End Of Object Inheritance & The Beginning Of A New ModularityThe Rising SeaDjangoTVSubclassing, Composition, Python, and You - TalkSubclassing in Python ReduxSponsorLearnDjango.com - 50% Black Friday Sale! -
Django: fix a view using a debugger with breakpoint()
This post is an adapted extract from my book Boost Your Django DX, available now with a 50% discount for Black Friday 2024. Python’s breakpoint() function opens its debugger, pdb, which pauses the program and allows you to inspect and modify things. Let’s look at an example of using it within a Django view, from a sample project included in Boost Your Django DX. Here’s what the project looks like: This page, “Party Central”, lists animals with their pizza preferences and whether they’re hungry. Underneath the table are two filter buttons, “Hungry” and “Satiated”, which allow you to select only animals with those hunger levels. Unfortunately, the filter buttons are broken. Click “Hungry” to load http://localhost:8000/?hungry=1 and we see the same list of animals: The hungry URL parameter is there, and the button is highlighted, but the data isn’t filtered. Let’s use pdb to figure out why. We can run pdb with the breakpoint() function, a Python built-in that opens the configured debugger (which is pdb by default). Let’s add it to the view function, before it renders the template. Here’s how the views.py file looks: from django.shortcuts import render from example.models import Animal def index(request): animals = Animal.objects.order_by("name") hungry … -
Creating AI-based Summaries in a Django Website
Summarizing lengthy text can be tedious, especially on platforms like PyBazaar, where concise summaries improve user experience. In this post, I'll share how I used Simplemind and Gemini to automate this process in my Django-based project. Background Info Recently, I launched PyBazaar.com, a website for Python developers to show their skills, find job offers, and post and find development resources. Its purpose is to have a central place where Python developers can market their services, products, or projects. PyBazaar shows lengthy descriptions of career opportunities and resources in the detail views and short summaries in the list views. Summaries help users quickly grasp the content of resources and career opportunities without opening each detailed view, enhancing the overall browsing experience on PyBazaar. To make the editing smoother, I introduced automatic summarization based on AI. Choosing Simplemind for Communication with LLMs Kenneth Reitz, the author of the famous package requests, recently published his newest creation—Simplemind—which improves the developer experience with the APIs of large language models (LLMs). I thought it would be a good opportunity to try integrating his package into PyBazaar. While I chose Google Gemini for its free tier, Simplemind's support for providers like OpenAI or Claude means developers … -
Creating AI-based Summaries in a Django Website
Summarizing lengthy text can be tedious, especially on platforms like PyBazaar, where concise summaries improve user experience. In this post, I'll share how I used Simplemind and Gemini to automate this process in my Django-based project. Background Info Recently, I launched PyBazaar.com, a website for Python developers to show their skills, find job offers, and post and find development resources. Its purpose is to have a central place where Python developers can market their services, products, or projects. PyBazaar shows lengthy descriptions of career opportunities and resources in the detail views and short summaries in the list views. Summaries help users quickly grasp the content of resources and career opportunities without opening each detailed view, enhancing the overall browsing experience on PyBazaar. To make the editing smoother, I introduced automatic summarization based on AI. Choosing Simplemind for Communication with LLMs Kenneth Reitz, the author of the famous package requests, recently published his newest creation—Simplemind—which improves the developer experience with the APIs of large language models (LLMs). I thought it would be a good opportunity to try integrating his package into PyBazaar. While I chose Google Gemini for its free tier, Simplemind's support for providers like OpenAI or Claude means developers … -
Django News - 2025 DSF Board Results - Nov 22nd 2024
News Announcing the 6.x Django Steering Council elections 🚀 The Django Software Foundation has announced early elections for the 6.x Steering Council to address technical governance challenges and guide the project's future direction. djangoproject.com Django Channels 4.2.0 Release Notes Channels 4.2 adds enhanced async support, including improved handling of database connections, compatibility with Django 5.1, and various bug fixes and improvements such as better in-memory channel layer behavior and more robust WebSocket handling. readthedocs.io Python Insider: Python 3.14.0 alpha 2 released Python 3.14.0 alpha 2 introduces features like deferred evaluation of annotations and a new Python configuration C API. blogspot.com Django Software Foundation 2025 DSF Board Election Results The 2025 DSF Board Election results are in, with Abigail Gbadago, Jeff Triplett, Paolo Melchiorre, and Tom Carrick joining the board for two-year terms. djangoproject.com 2024 Django Developers Survey The 2024 Django Developers Survey, is open until December 21st, offering insights into Django usage and a chance to win a $100 gift card for participants providing meaningful answers. djangoproject.com DSF Board monthly meeting, November 19, 2024 Meeting minutes for DSF Board monthly meeting, November 19, 2024 djangoproject.com Updates to Django Today's 'Updates to Django' is presented by Abigail Afi Gbadago from Djangonaut … -
Huey Background Worker - Building SaaS #207
In this episode, I continued a migration of my JourneyInbox app from Heroku to DigitalOcean. I switched how environment configuration is pulled and converted cron jobs to use Huey as a background worker. Then I integrated Kamal configuration and walked through what the config means. -
Django: find ghost tables without associated models
Heavy refactoring of models can leave a Django project with “ghost tables”, which were created for a model that was removed without any trace in the migration history. Thankfully, by using some Django internals, you can find such tables. Use the database introspection methods table_names() to list all tables and django_table_names() to list tables associated with models. By casting these to sets, you can subtract the latter from the former to find tables not associated with a model: In [1]: from django.db import connection In [2]: table_names = set(connection.introspection.table_names()) In [3]: django_table_names = set(connection.introspection.django_table_names()) In [4]: table_names - django_table_names - {"django_migrations"} Out[4]: {'sweetshop_humbug', 'sweetshop_jellybean', 'sweetshop_marshmallow'} Note the django_migrations table needs excluding. This is Django’s internal table for tracking migrations, which has no associated (permanent) model. From here, you’ll want to make a judgement call on what to do with the tables. Perhaps should have models and others can be removed. If a ghost table has no useful data or migration references, consider dropping it directly with SQL, rather than adding a migration. This can be done with dbshell. For example, using PostgreSQL: $ ./manage.py dbshell psql (...) Type "help" for help. candy=# DROP TABLE sweetshop_humbug; DROP TABLE Fin May your … -
Weeknotes (2024 week 47)
Weeknotes (2024 week 47) I missed a single co-writing session and of course that lead to four weeks of no posts at all to the blog. Oh well. Debugging I want to share a few debugging stories from the last weeks. Pillow 11 and Django’s get_image_dimensions The goal of django-imagefield was to deeply verify that Django and Pillow are able to work with uploaded files; some files can be loaded, their dimensions can be inspected, but problems happen later when Pillow actually tries resizing or filtering files. Because of this django-imagefield does more work when images are added to the system instead of working around it later. (Django doesn’t do this on purpose because doing all this work up-front could be considered a DoS factor.) In the last weeks I suddenly got recurring errors from saved files again, something which shouldn’t happen, but obviously did. Django wants to read image dimensions when accessing or saving image files (by the way, always use height_field and width_field, otherwise Django will open and inspect image files even when you’re only loading Django models from the database…!) and it uses a smart and wonderful1 hack to do this: It reads a few hundred bytes … -
Introducing DjangoVer
Version numbering is hard, and there are lots of popular schemes out there for how to do it. Today I want to talk about a system I’ve settled on for my own Django-related packages, and which I’m calling “DjangoVer”, because it ties the version number of a Django-related package to the latest Django version that package supports. But one quick note to start with: this is not really “introducing” the idea of DjangoVer, because I know I’ve used the name a few times already in other places. I’m also not the person who invented this, and I don’t know for certain who did — I’ve seen several packages which appear to follow some form of DjangoVer and took inspiration from them in defining my own take on it. Django’s version scheme: an overview The basic idea of DjangoVer is that the version number of a Django-related package should tell you which version of Django you can use it with. Which probably doesn’t help much if you don’t know how Django releases are numbered, so let’s start there. In brief: Django issues a “feature release” — one which introduces new features — roughly once every eight months. The current feature release series of Django is 5.1. … -
Django-related Deals for Black Friday 2024
Here are some Django-related deals for this year’s Black Friday (29th November) and Cyber Monday (1st December), including my own. I’ll keep this post up to date with any new deals I learn about. If you are also a creator, email me with details of your offer and I’ll add it here. For more general developer-related deals, see BlackFridayDeals.dev. My books My three books have a 50% discount, for both individual and team licenses, until the end of Cyber Monday (1st December). This deal stacks with the purchasing power parity discount for those in lower-income countries. Buy now: Boost Your Django DX - $21 instead of $42 (freshly updated!) Boost Your Git DX - $19.50 instead of $39 Speed Up Your Django Tests - $24.50 instead of $49 Aidas Bendoraitis’ paid packages Aidas Bendoraitis of djangotricks.com has created two paid packages. Use the links below for a 20% discount, available until the end of the 1st December. Django GDPR Cookie Consent - a customizable, self-hosted cookie consent screen. This package takes the pain out of setting up legally-mandated cookie banners and settings, without using an expensive or inflexible vendor. Buy it on Gumroad Django Paddle Subscriptions - an integration with … -
Boost Your Django DX updated again
I have just released the second update to Boost Your Django DX, my book of developer experience (DX) recommendations for Django projects. This update contains a new chapter, changes some recommended tools, and upgrades to Python 3.13 and Django 5.1. Overall, the book is 45 pages longer, now totalling 326! The most significant new addition is a chapter on debuggers: Python’s built-in one, pdb, and IPython’s enhanced version, ipdb. The chapter introduces pdb with realistic examples, covers all the essential commands, and includes many tips, like using the .pdbrc configuration file. Another major change is swapping the recommended CSS and JavaScript tools from ESLint and Prettier to Biome. Biome is a super-fast formatter and linter for CSS, JavaScript, JSON, TypeScript, and more. The new section introduces it and provides integration advice for Django projects. Thank you to everyone who has supported the book so far. Just the other day, it reached fifty five-star reviews. I am very grateful for all the feedback from the community and aim to keep improving the book. This update is free for all who previously purchased the book. To help readers catch up, the introduction chapter has a changelog with links to the updated sections, … -
How to migrate your Poetry project to uv
So, like me you’ve decided to switch from Poetry to uv, and now you’re wondering how to actually migrate your pyproject.toml file? You’ve come to the right place! -
Thoughts on my election as a DSF board member
My thoughts on my election as a member of the Django Software Foundation (DSF) board of directors. -
Rename uploaded files to ASCII charset in Django
Telling Django to rename all uploaded files in ASCII encoding is easy and takes only two steps. -
Django site permissions
-
Django comparison grid
-
Django-simpleadmindoc updated
create documentation for django website -
Extending different base template for ajax requests in Django
-
Django-sites-ext
-
Django app name translation in admin
"Django app name translation in admin" is small drop-in django application that overrides few admin templates thus allowing app names in Django admin to be translated. -
Django import export
Importing and exporting data with included admin integration. -
Django cookie consent application
django-cookie-consent is a reusable application for managing various cookies and visitors consent for their use in Django project.