Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Django News - Django 5.1.7, 5.0.13, and 4.2.20 - Mar 7th 2025
News Django security releases issued: 5.1.7, 5.0.13, and 4.2.20 Django releases critical security patches in versions 5.1.7, 5.0.13, and 4.2.20 to address a potential denial-of-service vulnerability in the django.utils.text.wrap() and wordwrap functions. djangoproject.com Join the DEFNA Board as Corporate Secretary! DEFNA is seeking a Corporate Secretary to support its board by managing compliance, record-keeping, and communications for the DjangoCon US community. defna.org Django for APIs (5th Edition) The fifth edition of the book, Django for APIs, has now been released and is available as either an online course or in paperback. wsvincent.com Updates to Django Today 'Updates to Django' is presented by Abigail Afi Gbadago from the DSF Board and Djangonaut Space!🚀 Last week we had 7 pull requests merged into Django by 6 different contributors - including a first-time contributor! Congratulations to Jonathan Ströbele for having their first commits merged into Django - welcome on board!🎉 This week's Django Highlights: A forloop.length variable has been added to track the number of iterations within a template for the loop. Django has published new security reporting guidelines to help reporters understand our security policies. Django Newsletter Wagtail CMS Working with Wagtail CMS Wagtail CMS enhances Django development by streamlining content management … -
Django Form Basics
Despite using Django for a number of years, I haven’t really worked with Django’s Forms until this week. I needed to create a form to handle a file upload, which has an associated category. The form also had to allow users to create new categories from within the file. When creating a new category, we have some extra data we want associated with the new category. I learned a few things trying to set this up. First, forms.ModelForm: The fields on this form don't have to map 1-1 to the model. The upload model has a category field, but we need some extra fields on the form when we create new categories that don't exist on the upload model. No problem! I thought I might have to fall back to a standard form since I needed extra fields, but I was able to add them to the form and assign them to the category in the view. Also, to break up and style different fields in a form, you can individually identify the fields in the template file and style them. So instead of <formid="id_upload_form" action="{% url 'app_name:upload_file' %}" method="post" enctype="multipart/form-data"> {% csrf_token %} {{ form|crispy }} <input type="submit" id="idupload_form_submit" … -
Deleting a Django Application from a Multi-Site Kubernetes Cluster
Recently, a client requested that we delete a website that was no longer used. The Kubernetes cluster was managed by an engineer who is no longer with the company, making the cluster feel like a concealed box. All I had was the website’s name. Since we use Ingress Nginx and Nginx as a web server, I figured the answer to my query could be found there. So I ran: sh kubectl get ingress --all-namespaces | grep website-url-to-delete.com And there it was: sh target-ns-prod ingress website–url-to-delete.com r0n4r9ca4e18004896b794ecd83b6cacb-14b8740e8ejf9fna.elb.us-east-2.amazonaws.com 80, 443 5y185d The correct namespace, target-ns-prod, was identified. Next, I dug a bit deeper to confirm it was indeed the correct namespace(ns) and to see which other namespaces were associated with the site: sh kubectl get ns | grep target-ns This returned: NAME STATUS AGE target-ns-prod ✅ Active 2y178d target-ns-prod-hosting-services ✅ Active 723d target-ns-qa ✅ Active 2y178d After compiling a list of relevant namespaces, I started by deleting the deployments—since they act as controllers managing the pods. I listed all target deployments with: sh kubectl get deployments --all-namespaces | grep target-ns I began with the staging environment, ensuring one final time that it was the correct site: sh kubectl delete deployment deployment-name --namespace … -
Sticking with Django - Florian Apolloner
Florian on GitHub, Mastodon, and BlueSkyDjango 3.0.1 Security Release related to potential hijack via password reset formBest Python IDE: Vim, Emacs, PyCharm, or Visual Studio Code? | Guido van Rossum and Lex Fridmanlithium: Django starter projectCopierSponsorThis episode was brought to you by HackSoft, your development partner beyond code. From custom software development to consulting, team augmentation, or opening an office in Bulgaria, they’re ready to take your Django project to the next level! -
Built with Django Newsletter - 2025 Week 10
Hey, Happy Wednesday! Why are you getting this: *You signed up to receive this newsletter on Built with Django. I promised to send you the latest projects and jobs on the site as well as any other interesting Django content I encountered during the month. If you don't want to receive this newsletter, feel free to unsubscribe anytime. News and Updates Finally got my first real ad ❤️ details below. Looks like the project will be self sustaining. New blog post is in the works. Sponsors This issue is sponsored by CodeRabbit an AI Code Reviewer that provides context-aware feedback, refactoring suggestions and highlights code security issues. In plain terms, you finally get a senior level developer reviewing your code! The best news is that it is completely free for any public repo! If you ask them nicely they might even give you more stuff for free. I've been using it to develop my projects, including this one and I can't recommend it enough. At the very least, you should give it a try and judge for yourself. Projects RecodeQR - Create QR codes you can track & edit anytime Khoj - Your AI second brain. Self-hostable. Get answers from … -
Django News - Wagtail 6.4.1 - Feb 28th 2025
News Introducing our new Terms of Service - The Python Package Index Blog PyPI is formalizing its policies to help move forward with some new services. pypi.org Django Software Foundation DSF Monthly Meeting Notes A reminder that the DSF Board's monthly meeting notes are also available for anyone to see. djangoproject.com Steering Council Minutes The new Django 6.x Steering Council has been meeting weekly this year and keeps a record of meeting notes. github.com Steering Council focus The Django Steering Council has its own public Projects section on GitHub covering what it is up to. github.com Updates to Django Today 'Updates to Django' is presented by Abigail Afi Gbadago from the DSF Board and Djangonaut Space!🚀 Last week we had 17 pull requests merged into Django by 11 different contributors - including 2 first-time contributors! Congratulations to Kairat Makym and Joonas Häkkinen for having their first commits merged into Django - welcome on board!🎉 Here are this week's Django Highlights: Improper many-to-many count() and exists() functions for non-pk to_field have been fixed (coming in Django 5.1.7). To avoid file corruption, previous files are truncated when overwriting files in FileSystemStorage (coming in Django 5.1.7). The BaseConstraint._check() has been renamed to check() … -
Django-treebeard: Converting an Existing Model to MP_Node
This article explains how to convert an existing Django model into an MP_Node model in django-treebeard, handling migrations, data population, and field constraints. -
Django Admin’s handling of dates and times is very confusing
When you have admin users in multiple time zones, the way Django handles the input and display of dates and times is causing confusion. Here’s how you can improve things. -
Mercurial Mirror For Django 5.2 Branch
Another upstream beta, another mirror. For the record, those mirrors are read-only, and aimed at production (aka “I want an easy way to update Django on servers “), not development (aka “i wanna commit”). -
Fixing Django FieldError at /admin/accounts/customuser/add/
If you are a Django developer who wants to add a custom user model to your project, you've likely come across this error on Django versions 5.0 and above. `FieldError … -
Django News - Django 5.2 Beta 1 & DjangoCongress JP goes live! - Feb 21st 2025
News Django 5.2 beta 1 released Django 5.2 beta 1 is now available and is the second stage in the release cycle. This is a good opportunity for you to try out the changes coming in Django 5.2. djangoproject.com DjangoCongress JP 2025 Live Streaming! DjangoCongress JP 2025 is this Saturday, February 22, 2025, at 10 am (Japan Standard Time) and will be broadcasting live! djangoproject.com Updates to Django Today 'Updates to Django' is presented by Abigail Afi Gbadago from the DSF Board! Last week we had 16 pull requests merged into Django by 9 different contributors - including 4 first-time contributors! Congratulations to Julien Palard, Kim Yeongbin, Confidenceman02 and Luke Cousins for having their first commits merged into Django - welcome on board! 🎊 This Week's Django Highlights: Support for some GIS functions on MariaDB 11.7 which was added in 5.2 has been reverted. The querystring template tag returns "?" instead of "" when all parameters are removed. Django Newsletter Sponsored Link 2 Hiring Jr. Web Services Engineer This position is for someone who can bring their python software development experience to support Playdate, Game Publishing, and our Apps! You would be responsible for contributing to and maintaining our growing … -
DSF Vice President 2025
Hi there, it's been a while, as always :) I had a though end of the 2024 year and beginning of 2025 (family loss) so I didn't do my usual year in review unfortunately, but I took the time to write my recent update: I'm the new Vice President of the Django Software Foundation 🎉 This is such an honor to serve on the board of the Django Software Foundation, and it's even more the case as the Vice President. I'm particularly glad to have this role since it's a way to connect to our members and I already had lovely emails responses while onboarding new DSF members. Vice President tasks The Vice President handle everything related to requests of new DSF members. Currently you can apply for yourself or apply for someone else. After that, it's reviewed and voted by the board for approval or not. If you planning to submit a DSF member, please add as many informations as you can, it's really helping us to know if the person meet the criterias to approuve the member. My tasks are: - send emails to approved members - add them to the mailing list used for the voting for … -
Official Django MongoDB Backend - Jib Adegunloye
Django MongoDB Backend RepoOfficial Django MongoDB Backend Now Available in Public PreviewDjangoCon Europe 2025Jib’s Blog Post on Developing this ProjectQuickstart dev.to articleLet’s Switch Things Up: Using MongoDB in an Intro Django ProjectKey Benefits of using MongoDB in DjangoMongoDB documentation on getting started with Djangodjango-simple-deploy repolithium Starter ProjectSponsorThis episode was brought to you by Buttondown, the easiest way to start, send, and grow your email newsletter. New customers can save 50% off their first year with Buttondown using the coupon code DJANGO. -
How to fix factory_boy post-generation deprecation warnings
We use factory_boy for bootstrapping test data on many Python and Django projects at Caktus. Recently, we encountered a deprecation warning on an older project that had been using factory_boy for some time: warnings.warn( /usr/local/lib/python3.12/site-packages/factory/django.py:182: DeprecationWarning: MyFactory._after_postgeneration will stop saving the instance after postgeneration hooks in the next major release. If the save call is extraneous, set skip_postgeneration_save=True in the MyFactory.Meta. To keep saving the instance, move the save call to your postgeneration hooks or override _after_postgeneration. We saw the warning because we run tests on CI with export PYTHONWARNINGS=always enabled, so we're warned early if we miss fixing a deprecation issue in Django or another dependency of our projects. The fix for this deprecation warning is nicely described in the warning itself. Specifically, one needs to identify post-generation hooks (usually decorated with @factory.post_generation), and update them to explicitly save the instance on their own if a change was made. This is also described in the release notes, but as I found when reviewing my colleague Simon's pull request with this change, it is sometimes easier to understand the fix with sample code. In our case, we decided to move the save() call into the post-generation hook itself, while respecting … -
Bookmarklets, defaults-from-GET, and iommi
Phil Gyford wrote an article about how nice it is that the Django admin pre-populates inputs from the GET parameters if there are any. This can be used for bookmarklets as in his examples, or just general bookmarks where you can quickly go to a page with parts of a form prefilled. Another very useful case for this pattern is to have a link on one page of your product with a link to a create form with prefilled data based on the context of the page you linked from. Like having an artist page with a link to the create album page with the artist filled in. The Django admin does this, but Django forms do not. Because Django forms have an API that takes a dict for the data and not the request object itself, it can’t be retrofitted to have this feature either. It’s a nice example of where limiting the API surface area also limits future development. In iommi, defaults-from-GET is the default for all forms. So if you build with iommi you get this feature across your product for free, not just in the admin. We even handle the edge cases for you like when … -
Django News - DjangoCon US Call for Proposals - Feb 14th 2025
News Python 3.14.0 alpha 5 is out Python 3.14.0a5 is the fifth of seven planned alpha releases. blogspot.com DjangoCon US Call for Proposals The CFP is now open until April 27th. The earlier you submit, the better! pretalx.com DSF member of the month - Lily Foote Lily is a long-time contributor to Django core, especially on the ORM, and is currently a member of the Django 6.x Steering Council. djangoproject.com I'm excited to join the Sovereign Tech Fellowship Hugo van Kemenade is now a full-time open source developer, working on Python, with a focus on CPython, including as release manager for Python 3.14 and 3.15. hugovk.dev Updates to Django Today 'Updates to Django' is presented by Abigail Afi Gbadago from the DSF Board! Last week we had 13 pull requests merged into Django by 9 different contributors - including 3 first-time contributors! Congratulations to Andrew, Brian Nettleton and Arnaldo Govene for having their first commits merged into Django - welcome on board!🎊 This Week's Highlights: Support for MariaDB 10.5 has been dropped so MariaDB 10.6 minimum supported version for Django 6.0 (to be released December 2025). Support for GEOSHasM has been added for the GEOS API. Requesting a default value … -
Prefixed Parameters for Django querystring tag
An overview of Django 5.1's new querystring tag and how to add support for prefixed parameters. -
TIL: Tools exist which do not lowercase domain names when requesting websites over HTTP(S)
TIL: Tools exist which do not lowercase domain names when requesting websites over HTTP(S) About a week ago I received error mails for a surprising behavior (to me!) where some tool requested an URL from one of our websites using feincms3-language-sites (a Django library for multilingual websites) with a domain name containing uppercase characters. I knew that the domain part of all sorts of URLs is case sensitive, but what surprised me was that our server actually got a request with such a domain name, I hadn’t really seen that before. After researching a bit I learned that for example curl intentionally preserves the casing of domain names, but browsers generally do lowercase domains because it’s more consistent. It’s interesting that the initial error was caused by a client with a proper Safari/macOS user agent, but further research showed that the request was probably sent by something called go-social-activity-parser, whatever that is. I fixed the bug in feincms3-language-sites and also in feincms3-sites by switching to case-insensitive matching of domain names. I have not yet added punycode or IDNA equivalence to the code because I haven’t needed it yet and because I’m not 100% sure how to do it without breaking … -
Built with Django Newsletter - 2025 Week 7
Hey, Happy Wednesday! Why are you getting this: *You signed up to receive this newsletter on Built with Django. I promised to send you the latest projects and jobs on the site as well as any other interesting Django content I encountered during the month. If you don't want to receive this newsletter, feel free to unsubscribe anytime. News and Updates Added Pagination to the Projects page as well as project search. Want to experiment with the new section called "Django Updates". Last week I published a post with all of January's blog post updates. In addition to doing monthly posts I want to add a streamlined version here, on what got updated during the week. Would love to hear some feedback if any. Sponsors This issue is sponsored by SEO Blog Bot. Well, sponsor is a strong word. It is just another project of mine that I wanted to share with you 🙈. Fully free! If you have a side project and are struggling with finding ideas for blog posts, this will help! If you want to become a real sponsor, just reply to this email or check out available options here. Projects Sombreros Olé - E-commerce - Handcrafted … -
Jump to dev
At Dryft I have the luxury of a small production database, so I can mirror prod to my local dev machine in ~3 minutes. I use this a lot to get quick local reproduction of issues. I used to copy-paste the relevant URL part to my local dev and felt quite happy with it. Then I realized that I could just paste the entire URL after http://localhost:8000/! My browser autocompleted that part anyway, and URLs like http://localhost:8000/https://[...] are obviously invalid for normal uses cases, so can cleanly be made to just strip out the domain part and redirect. This is the middleware I came up with to do this: def domain_strip_middleware(get_response): def domain_strip_middleware_inner(request): if not settings.DEBUG: return get_response(request) m = re.match(r'/https?://(?P<domain>[^/]*)(?P<path>/.*)', request.get_full_path()) if m: return HttpResponseRedirect(m.groupdict()['path']) return get_response(request) return domain_strip_middleware_inner -
Petites découvertes ou redécouvertes des derniers jours.
Le CSRF , mais pourquoi faire ? Imaginons, juste comme ça hypothétiquement, que vous vouliez désactiver de manière globale la protection CSRF sur la totalité des urls d’un site django. Vous pensez qu’il suffit de désactiver le middleware qui va bien (soit django.middleware.csrf.CsrfViewMiddleware ) pour que op c’est bon, la vérification CSRF n’est plus mise en place ? Vous serez alors décontenancé de voir que non, cela ne suffit pas. Il faut aussi ajouter le décorateur csrf_exempt ( qui se trouve dans django.views.decorators.csrf ) sur chacune de vos urls. Un peu compliqué en vrai, surtout si vous avez beaucoup d’urls. _ Comment faire ? Tout simplement coder un middleware qui va l’enlever pour vous. Vous n’aurez ensuite qu’à le déclarer dans les middleware actifs. class NOCSRFMiddleware(object): def __init__(self, get_response): self.get_response = get_response def __call__(self, request): setattr(request, '_dont_enforce_csrf_checks', True) response = self.get_response(request) return response Et voila ! Il suffit ensuite de le déclarer dans MIDDLEWARE et le tour est joué ( par exemple avec un BadIdeaApp.BadMiddleware.NOCSRFMiddleware Groupons, Groupons, Groupons !!! J’avais totalement oublié l’existence du templatetags regroup qui permet de regrouper des objets … -
Django News - Official MongoDB Backend Support - Feb 7th 2025
News Django 5.1.6, 5.0.12, and 4.2.19 bugfix release Two new bugfixes in the latest update. djangoproject.com MongoDB Django Backend Now Available in Public Preview The Official Django MongoDB Backend is now available in public preview. mongodb.com Python 3.13.2 and 3.12.9 now available! Python 3.13.2 and 3.12.9 are maintenance releases. python.org Updates to Django Boost Your Git DX second update out now Adam Johnson's excellent book, Boost Your Git DX, now has a second update available! adamj.eu Today 'Updates to Django' is presented by Velda Kiara from DEFNA and Djangonaut Space! Last week we had 21 pull requests merged into Django by 13 different contributors - including 3 first-time contributors! Congratulations to Peter DeVita, Mohammadreza Eskandari, and Vinko Mlacic for having their first commits merged into Django - welcome on board 🎊 ! This Week's Django Highlights: Allowed customizing the password_change_form in the Django Admin for custom validation (Django 6.0). Fixed a bug in ArrayAgg() which ensures it returns a default value when using an empty list filter(__in=[]). The Django Steering Council have started publishing their meeting minutes. Django Newsletter Wagtail CMS Enjoy a smoother content experience with Wagtail 6.4 Our newest features help you create and organize quality content even … -
The Future of Django - Emma Delescolle
Ember RFCs Emma has a blog LevITDjango: Looking Forward to the Next 20 Years drf-schema-adapterDjango 6.x Steering Council Election Results django-distill PyScript Rewriting Django from almost scratch in 2021 - DjangoCon Europe SponsorThis episode was brought to you by Buttondown, the easiest way to start, send, and grow your email newsletter. New customers can save 50% off their first year with Buttondown using the coupon code DJANGO. -
Built with Django Newsletter - 2025 Week 6
Hey, Happy Thursday! Why are you getting this: *You signed up to receive this newsletter on Built with Django. I promised to send you the latest projects and jobs on the site as well as any other interesting Django content I encountered during the month. If you don't want to receive this newsletter, feel free to unsubscribe anytime. News and Updates Last few weeks have been pretty good in terms of personal productivity, so I allowed myself some time to play around with LLMs. The results were quite good. If you are curious about my work and content I produce, you can subscribe to my personal newsletter. First thing that came out of it is the post about Django Updates in January 2025. I wrote some code that gets all the commit from the django repo from January, summarizes each one with AI and then creates a master summary with all the important details. I would love to hear your feedback about it, if any. I will keep iterating over it to improve. Even thinking about making a separate product out of it. I started dabbling in a new project which is top secret for now. Just kidding... I'm thinking … -
Django News - 400 DSF Members - Jan 31st 2025
News PyPI Now Supports Project Archival Projects on PyPI can now be marked as archived. pypi.org Django Software Foundation 400 individual members of the Django Software Foundation The Django Software Foundation reached 400 individual members. thib.me Updates to Django Today 'Updates to Django' is presented by Abigail Afi Gbadago from Djangonaut Space! Last week we had 21 pull requests merged into Django by 12 different contributors - including 2 first-time contributors! Congratulations to Gregory Mariani and Igor Scheller for having their first commits merged into Django - welcome on board!🎊 Highlights of the changes made: The main branch is now tracking development for Django 6.0. You can now squash a squashed migration. This eases the squashing process (#19082). Support has been dropped for Python 3.10 & 3.11 (#19067) Django Newsletter Wagtail CMS Our updated Accessibility Conformance Report Wagtail has released a new Accessibility Conformance Report for version 6.3, showcasing improvements across WCAG 2.2 criteria, detailing compliance in the CMS, documentation, and websites, and inviting feedback for further accessibility enhancements. wagtail.org Sponsored Link 1 Hiring Jr. Web Services Engineer This position is for someone who can bring their python software development experience to support Playdate, Game Publishing, and our Apps! You …