Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
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 … -
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. -
How to Use GraphQL in Django with Elasticsearch
When you need to use GraphQL with Django, a common practice is to use Graphene-Django, which allows you to query Django models. However, directly querying Django models might be too slow, especially when you have many complex relations. To speed that up, you can add one more layer of abstraction and index your Django models to an Elasticsearch server. In this article, I will show you how to create a GraphQL interface for querying posts from the Elasticsearch server. Elasticsearch Server The easiest way to install the Elasticsearch server locally is using EVM - Elasticsearch Version Manager: $ sudo curl -o /usr/local/bin/evm https://raw.githubusercontent.com/duydo/evm/master/evm $ sudo chmod +x /usr/local/bin/evm Then you can install Elasticsearch 7.17.27 (or other version) with EVM, as follows: $ evm install 7.17.27 By default, the Elasticsearch server will raise a warning if you don't have HTTPS or basic authentication. You can change one setting to turn off those warnings for localhost. To do so, add a line to ~/.evm/elasticsearch-7.17.27/config/elasticsearch.yml: xpack.security.enabled: false Now, you can start the server with: $ evm start If you need more Elasticsearch versions on the same computer, you can easily install and switch between them. Python Packages Install the latest packages of Django … -
Looking at Django task runners and queues
I use django-apscheduler to run a queue of scheduled tasks. Now I also need the ability to run one-off tasks and that turned out to not be so simple. -
Django News - Django 5.2 alpha 1 release - Jan 24th 2025
News Django 5.2 alpha 1 released Django 5.2 alpha 1 is now available. It represents the first stage in the 5.2 release cycle and is an opportunity for you to try out the changes coming in Django 5.2. djangoproject.com Hello from the new Steering Council; and a quick temporary voting process change The Steering Council is officially in action, and we want to give you a heads-up on a change we're making for the short term. djangoproject.com Djangonaut Space - New session 2025 Djangonaut Space is holding a fourth session! This session will start on February 17th, 2025. Applications are open until January 29th, 2025, Anywhere on Earth. djangoproject.com Tailwind CSS v4.0 - Tailwind CSS Tailwind CSS v4.0 is out — an all-new version of the framework optimized for performance and flexibility, with a reimagined configuration and customization experience, and taking full advantage of the latest advancements the web offers. tailwindcss.com Django Software Foundation President of the Django Software Foundation Notes from the Thibaud Colas, the new President of the Django Software Foundation. thib.me Updates to Django Today 'Updates to Django' is presented by Velda Kiara from Djangonaut Space! Last week we had 26 pull requests merged into Django by … -
Strip spaces
When I joined TriOptima back in 2010, a common pattern emerged where names of things were slightly off because of stray whitespaces. Sometimes we had duplicates like "foo", "foo " and " foo" in the database. Sometimes we couldn’t find stuff in logs because you searched for "foo was deleted", when actually you had to search for "foo was deleted" (notice the double space!). Sorting was “broken” because " foo" and "foobar" are not next to each other. And more issues that I can’t remember… It was everywhere, causing problems across the entire code base. Each individual issue was easily fixed by cleaning up the data, but it added up to an annoying support burden. My fix at the time was to make a function that took a Django Form instance and returned a new instance with space stripping on all fields. Something like: form = auto_strip(Form(...)) After I added that to every single Django form in the entire code base that slow and steady trickle of bugs and annoyances just stopped. From seeing a few a month consistently to zero for the next ~9 years. Even better: I never got a complaint about it. This was fixed in Django … -
Beyond Golden Pathways - Teaching Django with Sheena O’Connell
Sheena's Personal SitePreludeGuild of EducatorsDjangoCon US Keynote - Power to the People who Teach the PeoplePyCon Italia Keynote - A Tale from the TrenchesEscape conf - Testing Python Web Apps using PlaywrightWebinar: Why HTMX makes good business senseUsing Cursor to Port Django tests to pytestSponsorThis 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. -
Django admin tip: Adding links to related objects in change forms
Django admin tip: Adding links to related objects in change forms Any issue which came up on the Django Forum and Discord is how to add links to other objects to the Django administration interface. It’s something I’m doing often and I want to share the pattern I’m using. It’s definitely not rocket science and there are probably better ways to do it, but this one works well for me. Method 1: Override the change form template In one project users can be the editor of exactly one organization. The link between organizations and users is achieved using a Editor model with a ForeignKey(Organization) and a OneToOneField(User). I wanted to add a link to the organization page at the bottom of the user form. An easy way to achieve this is to add a template at templates/admin/auth/user/change_form.html (or something similar if you’re using a custom user model): {% extends "admin/change_form.html" %} {% block after_related_objects %} {{ block.super }} {% if original.editor %} <fieldset class="module aligned"> <h2>Organization</h2> <div class="form-row"> <a href="{% url 'admin:organizations_organization_change' original.editor.organization.pk %}">{{ original.editor.organization }}</a> </div> </fieldset> {% endif %} {% endblock after_related_objects %} The original context variable contains the object being edited. The editor attribute is the reverse … -
Django News - Django 5.1.5 security release - Jan 17th 2025
News Django security releases issued: 5.1.5, 5.0.11, and 4.2.18 Several new security updates. As ever, you should endeavor to be on the latest version of Django for security reasons. djangoproject.com Django 5.2 alpha 1 released Django 5.2 alpha 1 is now available. It represents the first stage in the 5.2 release cycle and is an opportunity for you to try out the changes coming in Django 5.2. djangoproject.com Python Insider: Python 3.14.0 alpha 4 is out Python 3.14 is still in development. This release, 3.14.0a4, is the fourth of seven planned alpha releases. python.org Djangonaut Space Session 4 Applications Open! Djangonaut Space Applications are open now and close on January 29th, 2025 AOE. djangonaut.space Django Software Foundation Hello from the new Steering Council; and a quick temporary voting process change An update on the voting process to move faster on the smaller things the SC currently has in from of them. djangoproject.com Updates to Django Today 'Updates to Django' is presented by Velda Kiara from Djangonaut Space! Last week we had 20 pull requests merged into Django by 12 different contributors 🎊! Highlights of the changes made: The contrib.postgres aggregates ordering argument has been deprecated in favor of order_by. URLField … -
Thinking About Risk: Sidebar #3: Two Flavors of Medium Risk
When you look at a likelihood/impact risk matrix, you might notice that “medium” appears twice – once as high-likelihood/low-impact, and once as low-likelihood/high-impact. These two “mediums” aren’t at all the same! -
Building SaaS with Python and Django #212.2
In this episode, we continued on the sign up workflow simplification. The focus of this stream was on adding the background task that will send the magic link email to allow sign in. This is the second half of the stream because my internet cut out. -
Signin Email - Building SaaS #212.1
In this episode, we continued on the sign up workflow simplification. The focus of this stream was on adding the background task that will send the magic link email to allow sign in. -
Built with Django Newsletter - 2025 Week 3
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 Happy New Year! Hope the first 16 days of 2025 have been good to you! Hope this year will be the best one for you so far! I haven't been to proactive with Built with Django updates unfortunately. So much has been going on with personal life and work that it left very small amount of time for side projects. Starting to pick up the pace fortunately, will see what will be coming. If you have any requests/ideas for the website, please let me know! What I'm hoping to do in the coming months is up the number of posts on the blog, and hopefully start doing some video tutorials. 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 … -
Thinking About Risk: Sidebar #2: The Swiss Cheese Model
In the real world, accidents happen when a series of small missteps align to create severe consequences. This is something we call the “Swiss Cheese Model”: imagining a systems failure as a set of “holes” in our layers of defense that all line up to create a series accident. -
New upcoming Dutch python meetup: Leiden (NL)
Important things first: 27 January there's a python meetup in Leiden (NL) of the new python Leiden user group. Meetup groups come and go, often depending on one or two people or on a company that organises it. And yes, meetup.com has basically cornered the market, at least in my experience. There used to be a "PUN", python usergroup Nederland, meeting that would be held in various cities, depending on the company that hosted it in turn. (For those in NL: Den Haag, Zoetermeer, Rotterdam, Utrecht, Veenendaal, Arnhem, Amsterdam, ...). Managed via a mailinglist, as meetup.com didn't exist yet. Later lots of python and/or django meetup.com-based-meetups were organised. To me, it felt a bit weird that all of them seemed to be city-oriented. Amsterdam python meetup (3 different ones), Amsterdam django meetup, Utrecht (2x), Eindhoven, Rotterdam. I went to many of them, mostly it is just an hour of travel by public transport :-) I like going to those meetups. You get a feel for what people are doing with python. You get ideas. You learn about libaries (sometimes even from the standard library) that you didn't know about. New python tricks. For me, it is a great method to …