Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
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 … -
BoundField vs iommi
In Django 5.2 we got a way to easier customize attributes of forms. Adam Johnson posted an example on mastodon, which I’ve slightly abbreviated below: class WideLabelBoundField(BoundField): def label_tag(self, contents=None, attrs=None, label_suffix=None): if attrs is None: attrs = {} attrs['class'] = 'wide' return super().label_tag(contents, attrs, label_suffix) class NebulaForm(Form): name = CharField( bound_field_class=WideLabelBoundField, ) To set a single CSS class on a single label, you have to create an entire class. Let’s look at the same thing in iommi: class NebulaForm(Form): name = Field.text( label__attrs__class__wide=True, ) But, you might object, what if you need to run some code to customize it? Like if the example didn’t just set "wide" as the value, but set it to "wide" only for staff? Not only is this also easy in iommi, I would argue it’s even easier and cleaner than in the BoundField case above: class NebulaForm(Form): name = Field.text( label__attrs__class__wide=lambda user, **_: user.is_staff, ) -
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 … -
Deployment Snafus and AI - Building SaaS #215
In this episode, I finished up the sign in simplification feature for the homeschool app. I planned to do deploy it quickly and move onto the next thing, but we hit a comedy errors and challenges while trying to get Docker Desktop working again on my dev machine. On the stream, we also began to play with Ollama in preparation of doing some agentic AI framework research. -
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 … -
Easy Python Parallelism using Ray
In this talk, we explore the Ray library and how it can be used to easily parallelize Python code. We cover the basics of using Ray Core, including installation, spinning up a local Ray cluster, and running remote actors and tasks. -
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 … -
Better Onboarding - Building SaaS #214
In this episode, I returned to the homeschooling application and started to improve the sign up and onboarding experience. We simplified signup to eliminate passwords and work via email. I talked through the design changes that I plan to make to the first time experience for new users. -
Learning to Löve game development - Designing games with Lua
Experience the magic of game creation! We delved into the enchanting world of Lua, the language that powers the lightweight, open-source Löve game engine. Here’s what you’ll find: -
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 … -
Finishing Simple Signup - Building SaaS #213
In this episode, I completed the simplified sign up process for my JourneyInbox app. I finished off the final features that add account verification and initial engagement features to make sign up and nice and functional experience. -
Weeknotes (2025 week 05)
Weeknotes (2025 week 05) Djangonaut Space In December I wrote a few paragraphs about my decision to not run for the Django Steering Council, mentioning that I want to contribute in different ways. I have offered to contribute to Djangonaut Space to do some mentoring. I’m already a bit stressed, but that’s normal and to be expected. I’ll probably have more to share about that in the close future! Releases feincms-cookiecontrol 1.6: Removed the hardcoded dependency upon feincms3 and some additional code golfing. The cookie banner JavaScript is now back to <4KiB. django-curtains 0.7: Updated the CI job list and modernized the package somewhat, no code changes necessary. It’s good to release updated versions though just to show that it’s still actively maintained. django-prose-editor 0.10.3: Small CSS fixes and mainly updated TipTap/ProseMirror. django-imagefield 0.22: The updated version no longer autodeletes processed images; this wasn’t really a problem before but I was a little bit fearful that images are still referenced elsewhere and this change let’s me sleep better. feincms-oembed 2.0: Oembed support for FeinCMS 1 without actually depending upon the FeinCMS package itself. Still works. django-content-editor 7.2: The Region type is now hashable; this may be useful, or not. feincms3 … -
Thinking About Risk: Sidebar #4: Quantitative Risk Revisited
In part 1 of this series, I briefly covered quantitive risk measuring – assigning a numeric value to risk, like “$3,500”, rather than a qualitative label like “medium” – only to quickly recommend against trying it. In this final sidebar, I want to come back to this topic. I’ll spend a bit more time explaining what I see as the pros and cons of quantitative risk measurement – why you might or might not want to use numeric values over more simple risk matrixes. -
Python Leiden (NL) meetup: fawltydeps - Johan Herland
(One of my summaries of the Python Leiden (NL) meetup in Leiden, NL). FawltyDeps is a python dependency checker. "Finding undeclared and unused dependencies in your notebooks and projects". Note by Reinout: since 2009 I'm one of the maintainers of z3c.dependencychecker.... also a python dependency checker :-) So this talk interested me a lot, as I didn't know yet about fawltydeps. A big problem in science is the "replication crisis". Lots of research cannot actually be reproduced when you try it... Data science is part of this problem. Reproducing your jupyter notebook for instance. Someone looked at 22k+ jupyter notebooks. Only 70% had declared their dependencies, 46% could actually install the dependencies and only 5% actually could be run. ModuleNotFoundError and ImportError were the number 1 and 3 in the list of exceptions! What is a dependency? For instance "numpy", if you have a import numpy as np in your file. Numpy isn't in the python standard library, you have to install it first. You can specify dependencies in setup.py, pyproject.toml, requirements.txt and so. If you import something and don't specify it, it is an "undeclared dependency". When you later on remove an import and don't adjust your requirements.txt, you … -
Python Leiden (NL) meetup: python in applied mathematics - Tobias Datema
(One of my summaries of the first Python Leiden (NL) meetup in Leiden, NL). Tobias studied applied mathematics at Delft University. One of the fields he used python for was graph theory. A graph consists of points ("vertices") connected by lines ("edges"). It is a large field with many real world projects like social networks and logistics. He showed a demo he made with networkx, a python library that makes it real easy to do these kinds of graph calculations. Graphs need to be shown. He used pyviz for that by converting the networkx graph to the format understood by pyviz. Another field is machine learning. He did an experiment with a simulated self-driving car. He used a library that handles the basics like "reacting to a closed line on the road" and "measuring the distance to the dashed line on the road". The simulation is shown in a visual form, which makes it funny to look at. In his study, python was also handy for statistics and numerical analysis.