Django community: Community blog posts RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Django News - PyPI Expanding Trusted Publisher Support - Apr 19th 2024
News Don't Miss Out: Last Call for DjangoCon US 2024 Talk Proposals! Have you submitted your talk or tutorial for DjangoCon US 2024, in beautiful Durham, North Carolina, USA? This is your last call to submit a talk or tutorial. The CFP deadline is April 24, 2024, at 12 PM EDT. djangocon.us PyPI: Expanding Trusted Publisher Support PyPI added GitLab CI/CD, Google Cloud, and ActiveState as Trusted Publishing providers. pypi.org Django Software Foundation DSF Board meeting minutes for April 11, 2024 Here are the DSF Board's meeting minutes for April 11, 2024. djangoproject.com Updates to Django Today 'Updates to Django' is presented by Raffaella Suardini from Djangonaut Space! Last week we had 10 pull requests merged into Django by 5 different contributors - including 1 first-time contributor! Congratulations to Aleksander Milinkevich for having their first commits merged into Django - welcome on board! Coming in Django 5.0.5 (expected May 6th): Resolved a compatibility issue with Python 3.11.9+ and 3.12.3+ when validating email max line lengths with content decoded using the surrogateescape error handling scheme. Resolved a bug in Django 5.0 that makes Model.save() crash when creating a model instance with a GeneratedField and specifying a primary key. Django Newsletter Wagtail … -
Octopus Energy - Çağıl Uluşahin Sönmez
Django Software Foundation BoardOctopus EnergyLocal Django CommunitiesDjango London Meetup GroupDjangoCon US 2021: How We Built a Mobile Application Backend with Django in 10 WeeksEuroPython 2023: The coding conventions that make our lives easier Support the ShowLearnDjango.comButtonDjango News newsletter -
Building forms with the Django admin
Building forms with the Django admin The title of this post was shamelessly copied from Jeff Triplett’s post on Mastodon. Why? Many websites need a simple way of embedding forms, for example as a contact form or for simple surveys to collect some data or inputs from visitors. Django’s forms library makes building such forms straightforward but changing those forms requires programming skills and programmer time. Both of them may not be readily available. More importantly, sometimes it’s just nice to give more tools to web publishers. The simple way to build something like this is to use a form builder such as Google Forms, Typeform, Paperform or anything of the sort. Those options work nicely. The downsides are that embedded forms using those services load slowly, look differently, cost a lot or collect a lot of data on users, or all of those options. Because of that there’s still a place for building such functionality locally. If I wanted to use PHP and WordPress I could just use WPForms and call it a day. Since I do not actually want that this blog post is a bit longer. The early days: form-designer One of the first Django-based third party … -
Django News - Open Source Week - Apr 12th 2024
News Python 3.11.9, 3.12.3, and 3.13.0a6 released! This week we saw new Python 3.11.9, 3.12.3, and 3.13.0a6 releases. Django Newsletter PyPI: Malware Distribution and Domain Abuse Domain names used in a malware attack, and how PyPI handled it. pypi.org Updates to Django Today 'Updates to Django' is presented by Velda Kiara from Djangonaut Space! Last week we had 9 pull requests merged into Django by 8 different contributors - including 3 first-time contributors! Congratulations to Lang Tran, us77ipis, and devin13cox for having their first commits merged into Django - welcome on board! Django 5.0.4 has been released which includes the bug fixes: Fixed a crash in Django 5.0 on table aliases and lookups on a GenerateField of the aliased table Fixed a bug in Django 5.0 that caused a migration crash when adding a GeneratedField relying on the __contains or __icontains lookups or using a Value containing a "%". If you're currently on Django 5.0.3, I recommend upgrading to 5.0.4 to benefit from these improvements. We would also like to extend a special recognition to Mariusz Felisiak for being a fellow for the past 5 years. In his final year, his contributions include: Triaged: 602 issues Reviewed/committed: 555 PRs Authored: … -
Weeknotes (2024 week 14)
Weeknotes (2024 week 14)I’m having a bit of a slow week with the easter weekend and a wisdom tooth extraction. I’m recovering quite quickly it seems and I’m glad about it. This weeknotes entry is short and quick. I’m trying to get back into the habit of writing them after a mediocre start this year. 20th Anniversary Celebration of Young Greens Switzerland I have attended the celebration of Young Greens Switzerland. I have been a founding member and have been active for close to ten years. A lot of time has passed since then. It has been great to reminisce about old times with friends and, more importantly, to see how the torch is carried on. Releases blacknoise 0.0.5: blacknoise is an ASGI app for static file serving inspired by whitenoise. It only supports a very limited subset of whitenoise’s functionality, but it supports async. html-sanitizer 2.4.1: The lxml library moved the HTML cleaner into its own package, lxml-html-clean; this release adds support for that. I didn’t know that the HTML cleaner is viewed as being problematic by the lxml maintainers. I’m having another look at nh3 and will maybe switch html-sanitizer’s guts from lxml to nh3 in the future. … -
Django News - Django 5.0.4 bugfix release - Apr 5th 2024
News Django bugfix release issued: 5.0.4 Check out the Django 5.0.4 release notes for a list of five bug fixes in this release. djangoproject.com Join DEFNA! Board Member Recruitment Django Events Foundation North America (DEFNA) is seeking another board member. This is a great chance to help grow the DjangoCon US community. defna.org PSF News: New Open Initiative for Cybersecurity Standards A new Open Initiative for Cybersecurity Standards by the PSF, Apache Software Foundation, Eclipse Foundation, other code-hosting open source foundations, SMEs, industry players, and researchers. This collaboration is focused on meeting the real challenges of cybersecurity in the open-source ecosystem and demonstrating full cooperation with and supporting the implementation of the European Union’s Cyber Resilience Act (CRA). blogspot.com Updates to Django Bringing you today’s ‘Updates on Django’ is Emmanuel Katchy from Djangonaut Space! Last week, we merged 8 pull requests into Django, thanks to 5 different contributors! Congratulations to Taishi Endo for getting their first PR merged into Django - welcome aboard! An accessibility change has been implemented in the admin UI with PR #17489, making the "Change Password" link a more user-friendly button. Have you ever wondered what happens to NULL values in a field with a unique … -
Why I'm Not Writing a Productivity Series
I planned and started to write a series about personal productivity systems, but I’m abandoning the series. Here’s why. -
Flash messages and content encodings - Building SaaS with Python and Django #188
In this episode, we added flash messages (after a rough start with some networking issues). Then I tracked down a thorny issue. We found that there is a non-breaking space with ’timesince’ that affects the encoding and what links Gmail adds to emails. -
Django ORM - Simon Charette
@charettes on GitHubDjangoCon US 2022 Keynote: State of the ORM and slidesDjango Steering Council and Security TeamZapierPyCon Australia 2016: Red User, Blue User, MyUser, auth.User Support the ShowLearnDjango.comButtonDjango News newsletter -
NATS: Connecting Apps Over a Network Easily
NATS is an awesome open source technology to help connect code together over a network. Whether you’re build a distributed microservice architecture or connecting IoT devices, NATS provides the tools you need to do that easily. In this talk, you’ll learn about NATS via a presentation with plenty of live coding examples. -
Python Project-Local Virtualenv Management Redux
One of my first TIL entries was about how you can imitate Node’s node_modules semantics in Python on UNIX-like operating systems. A lot has happened since then (to the better!) and it’s time for an update. direnv still rocks, though. -
Mentorship, coaching, sponsorship: three different — and equally important — tools for developing talent
One of the main responsibilities of a leader/manager is helping their staff develop. Mentorship, coaching, and sponsorship are import tools in the staff development toolbox. Good leaders should be adept in all three, and know when (and when not) to use each. In my work with new managers, I sometimes see confusion about these three different tools, and I see people using them in the wrong circumstances. So here’s a glossary, a high-level explanation of what these three things are, how they differ, and where to use them. -
Django News - 🎉 Sarah "New Django Fellow!" Boyce 🎉 - Mar 29th 2024
News Welcome our new Django Fellow Sarah Boyce is the newest Django Fellow! Read more about her background as a software developer and active member of the Django community. djangoproject.com PyPI halted new users and projects while it fended off supply-chain attack PyPI temporarily halted new project creation and new user registration following an onslaught of package uploads that executed malicious code on any device that installed them. arstechnica.com DEFNA! Board Member Recruitment Django Events Foundation North America (DEFNA), the non-profit behind DjangoCon US is looking for another board member. defna.org Updates to Django Today 'Updates to Django' is presented by Pradhvan from Djangonaut Space! Last week we had 12 pull requests merged into Django by 7 different contributors - including 2 first time contributors! Congratulations to Laurent Lyaudet, and Sharon Woo for having their first commits merged into Django - welcome on board! In Django 5.1, an optional srid argument was added to FromWKB and FromWKT GIS functions that allows to specify the SRID (Spatial Reference System Identity) of the resulting geometry. Django Newsletter Wagtail CMS Technical writing, asking for help, and other things I learned during my Outreachy internship A few lessons learned by the author during their … -
Discussing Open Source funding and sustainability on the Sustain podcast
I was invited on the Sustain podcast to discuss my recent rant about open source sustainability. I talked about my reaction to the criticism that open source maintainers receive when they take funding, and how this is a personal issue for me – maintainers aren’t abstract ideas to me, they’re my friends. We discussed my call for a more expansive definition of open source, and got into some of the nuance about some of the problems this can cause. -
Start Polishing - Building SaaS with Python and Django #187
In this episode, we attacked the issue list. JourneyInbox is live and serving user and now it’s time to start polishing and building the full set of features. There are so many easy targets to fix that we focused on a few clear improvements to user experience and the user interface. -
The Django admin is a CMS
The Django admin is a CMSThe post Why is the Django Admin “Ugly”? and the discussion on Mastodon around it finally motivated me to write down my thoughts regarding the recurring theme in Django land that the Django administration interface isn’t a CMS (Content Management System). I think that this is misguided and needlessly limits the discourse around what the admin’s current functionality is and the ideas what it could be and already is. A web content management system is about website authoring for users who do not need to be web programming experts in their own rights. Django was created at the Lawrence Journal-World newspaper. The admin itself was created to allow quickly spinning up new websites, where the admin interface was used by content managers to fill in the content while programmers finalized the rest of the website. So obviously the admin interface was a system used to manage content1 from the beginning. Sure, the Django admin site documentation states: One of the most powerful parts of Django is the automatic admin interface. It reads metadata from your models to provide a quick, model-centric interface where trusted users can manage content on your site. The admin’s recommended use … -
Django: Write-up on optimizing the system check framework
Django’s system check framework provides fantastic protection for configuration mishaps. It’s like a targeted linter that runs when you start Django commands. It takes advantage of runtime setup to inspect the true state rather than infer it from the source. I love the system check framework: I have contributed to several built-in checks, maintain a package of extra checks, and have a whole chapter on it in Boost Your Django DX. Unfortunately, the framework has gained a reputation for being slow, at least on larger projects. For example, Jeff Triplett recently tooted: My #Django magic wand would disable checks running on all the things by default unless explicitly turned called or turned on. Q: Why does it take so long to run manage.py for my project? A: Django's manage.py runs checks which scan every Python file by default with apparently no cache and takes double-digit seconds to minutes for non-trivially sized projects with no easy way to disable. You can pass --skip-checks. I’ve heard and seen similar advice from others. Anders Hovmöller’s package django-fastdev goes as far as monkey-patching checks to run in a separate thread, so they don’t block runserver startup. I always felt dismayed by this observation. It … -
Keynote at PyCon Lithuania 2024
From April 2nd to April 6th I'll be at PyCon Lithuania 2024 in Vilnius to present a keynote about 25 years of glorious coding mistakes (mostly in Python). Audrey and Uma will be accompanying me, making us the first members of the Lithuanian side of my family to return there in over 100 years! At the conference I'll be joined by my old friend Tom Christie, author of HTTPX, Starlette, and Django REST Framework. I hope to meet many new friends, specifically everyone there. At the sprints I'll be joined by my awesome wife, Audrey, author of Cookiecutter. Come and join us! -
Django News - Django REST Framework 3.15 - Mar 22nd 2024
News Django REST framework 3.15 Release Notes The first major release since September 2022 is here! Now with Django 5.0 and Python 3.12 support as well as a long list of new features. django-rest-framework.org 🐍 Python Insider: Python 3.10.14, 3.9.19, and 3.8.19 is now available Python 3.10.14, 3.9.19, and 3.8.19 security releases are now available. blogspot.com Updates to Django Today 'Updates to Django' is presented by Raffaella Suardini from Djangonaut Space! Last week we had 17 pull requests merged into Django by 8 different contributors. All built-in session engines now provide an async API thanks to the hard work of Jon Janzen, Mariusz Felisiak and Andrew Chen Wang. Last week a regression got fixed in Django 5.0 where admin could be rendered with two id attributes on the clear checkbox. Django Newsletter Wagtail CMS What’s New in Wagtail CMS 6.0: Email Newsletter Package, UI Designs, Universal Listings There are loads to share in this episode, including features in the latest 6.0 release, a preview of the new email newsletter package, and future design possibilities. youtube.com Sponsored Ad crunchydata.com Articles Django: Fuss-free use of Homebrew GDAL/GEOS libraries on macOS GeoDjango requires the GDAL and GEOS spatial libraries. Adam Johnson has some … -
Post-launch Punchlist - Building SaaS with Python and Django #186
In this episode, we had a bunch of issues to resolve post-launch. I set the code that causes trials to expire, made updates to who receives prompt emails, and added some polish to the sign up process and interface to make it clear what will happen in the flow. After those modifications, we worked through a set of smaller changes like setting up Dependabot and adding a missing database index. -
Django’s Evolution - Jacob Kaplan-Moss
Jacob’s personal site Latacora PyCon 2017: Let’s Build a Web Framework! Producing Open Source Software bookPyCon 2015: Keynote PyCon 2019: Assets in Django without Losing Your Hair DjangoCon Europe 2014: Django Without DjangoDjangoCon 2018 Keynote: Adrian Holovaty and Jacob Kaplan-Moss PyCon Canada 2013: Python is Everywhere Snakes and Rubies django-template-partialsInformal roadmap & retrospective workshops for Django Deno django-simple-deploy Support the ShowLearnDjango.comButtonDjango News newsletter -
blacknoise – ASGI app for static file serving
blacknoise – ASGI app for static file serving Note This blog post consists of the blacknoise README at the time of publishing. blacknoise is an ASGI app for static file serving inspired by whitenoise and following the principles of low maintenance software. This is pre-alpha software and everything is subject to change. I’m not even sure if blacknoise should exist at all or if the energy wouldn’t be better spent improving whitenoise or other tools. Feedback and contributions are very welcome though! Using blacknoise with Django to serve static files Install blacknoise into your Python environment: pip install blacknoise Wrap your ASGI application with the BlackNoise app: from blacknoise import BlackNoise from django.core.asgi import get_asgi_application from pathlib import Path BASE_DIR = Path(__file__).parent application = BlackNoise(get_asgi_application()) application.add(BASE_DIR / "static", "/static") BlackNoise will automatically handle all paths below the prefixes added, and either return the files or return 404 errors if files do not exist. The files are added on server startup, which also means that BlackNoise only knows about files which existed at that particular point in time. Improving performance BlackNoise has worse performance than when using an optimized webserver such as nginx and others. Sometimes it doesn’t matter much if … -
Django: Fuss-free use of Homebrew GDAL/GEOS libraries on macOS
GeoDjango requires the GDAL and GEOS spatial libraries. On macOS, you can use Homebrew to install these, but they won’t be picked up by default since they live in a non-default library directory, /opt/homebrew/lib. Django will fail to start with an exception: Traceback (most recent call last): ... File "/.../site-packages/django/contrib/gis/gdal/libgdal.py", line 60, in <module> raise ImproperlyConfigured( django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library (tried "gdal", "GDAL", "gdal3.4.0", "gdal3.3.0", "gdal3.2.0", "gdal3.1.0", "gdal3.0.0", "gdal2.4.0", "gdal2.3.0", "gdal2.2.0"). Is GDAL installed? If it is, try setting GDAL_LIBRARY_PATH in your settings. You can follow the message and set GDAL_LIBRARY_PATH, and similarly GEOS_LIBRARY_PATH. But that leaves you with a change in your settings file that you need to be careful not to commit, otherwise it will break the project for other environments. Also it’s a per-project solution, requiring repetitive repetition whenever you encounter the error. My preferred alternative is to add symlinks in the default library directory, /usr/local/lib, pointing to the Homebrew library location: $ ln -s /opt/homebrew/lib/libgdal.dylib /usr/local/lib/libgdal.dylib $ ln -s /opt/homebrew/lib/libgeos_c.dylib /usr/local/lib/libgeos_c.dylib That’s a once-and-for-all solution that will work for all projects, and persist through upgrades. dyld library paths Another option you may see suggested is to set either DYLD_FALLBACK_LIBRARY_PATH or DYLD_LIBRARY_PATH to include … -
Talking about Django's history and future on Django Chat
I was on the Django Chat podcast to about Django’s history, the creation of the DSF, my recent return to the DSF board and my goals there, and the things I’m excited about for Django going forward. Here are some highlights from the interview. -
Podcasts I like listening to
Podcasts I like listening toI discovered listening to podcasts about one year ago. Previously, I never knew why anyone would want to listen to people talk when they could listen to music or nothing, but that has changed a bit. So, here’s a list of podcasts I’m currently listening to on a regular basis. Tech Won’t Save Us I have recently stumbled over Tech Won’t Save Us, a Podcast which is critical of the technological “progress” offered by Silicon Valley elites. It’s a great antidote for the generative AI hype. I still have some stupid hope that AGI will solve our problems because maybe people will trust a computer more than scientists that something has to be done about the combined crisis we’re facing as humans. Who knows. I do not want to be too negative about it though, there are positive news if you’re looking in the right places. I myself do not write about those bigger issues as much as I used to. I support those more important issues elsewhere. Generative AI is certainly not helping me in my work. I do not want a computer to generate code which I have to review and maintain when I …