web | https://406.ch/writing/category-django/ |
---|---|
Author |
Dec. 20, 2024 » Matthias Kestenholz: Posts about Django » [Archived Version]
Weeknotes (2024 week 51) Building forms using Django I last wrote about this topic in April. It has resurfaced on Mastodon this week. I’m thinking about writing a feincms3-forms demo app, but I already have too much on my plate. I think composing a forms builder on top of django-content-editor is the way to go, instead of replacing the admin interface altogether – sure, you can always do that, but it’s so much less composable… Releases blacknoise 1.2: No real changes, …
Read MoreDec. 18, 2024 » Matthias Kestenholz: Posts about Django » [Archived Version]
Object-based assets for Django’s forms.Media The pull request for adding object-based script media assets into Django is in a good state and I hope it will be merged soon. I have been using object-based assets long before Django actually added support for them in 4.1 (since 2016, that’s before Django 1.10!) by using a gross hack. Luckily I have been able to clean up the code when Django 4.1 landed. I have been asking myself at times why I haven’t proposed the change to Django …
Read MoreDec. 6, 2024 » Matthias Kestenholz: Posts about Django » [Archived Version]
Weeknotes (2024 week 49) Django Steering Council elections I have been thinking long and hard about running for the Django Steering Council. I think there are a few things I could contribute since I’ve been using Django for 16 or more years, and have been working on, maintaining and publishing third-party apps almost all this time. I have also contributed a few small features to Django core itself, and contributed my fair share of tests and bugfixes. The reason why I haven’t been mo…
Read MoreDec. 4, 2024 » Matthias Kestenholz: Posts about Django » [Archived Version]
Rebuilding django-prose-editor from the ground up The django-prose-editor package provides a HTML editor based upon the ProseMirror toolkit for the Django administration interface and for the frontend. The package has been extracted from a customer project and open sourced so that it could be used in other projects as well. It followed a very restricted view of how rich text editors should work, which I have initially added to the FeinCMS repository when documenting the design decisions more th…
Read MoreNov. 20, 2024 » Matthias Kestenholz: Posts about Django » [Archived Version]
Weeknotes (2024 week 47) I missed a single co-writing session and of course that lead to four weeks of no posts at all to the blog. Oh well. Debugging I want to share a few debugging stories from the last weeks. Pillow 11 and Django’s get_image_dimensions The goal of django-imagefield was to deeply verify that Django and Pillow are able to work with uploaded files; some files can be loaded, their dimensions can be inspected, but problems happen later when Pillow actually tries resizing or…
Read MoreOct. 23, 2024 » Matthias Kestenholz: Posts about Django » [Archived Version]
Weeknotes (2024 week 43) I had some much needed time off, so this post isn’t that long even though four weeks have passed since the last entry. From webpack to rspack I’ve been really happy with rspack lately. Converting webpack projects to rspack is straightforward since it mostly supports the same configuration, but it’s much much faster since it’s written in Rust. Rewriting things in Rust is a recurring theme, but in this case it really helps a lot. Building the front…
Read MoreSept. 25, 2024 » Matthias Kestenholz: Posts about Django » [Archived Version]
Weeknotes (2024 week 39) CSS for Django forms Not much going on in OSS land. I have been somewhat active in the official Django forum, discussing ways to add Python-level hooks to allow adding CSS classes around form fields and their labels. The discussion on the forum and on the pull request goes in the direction of allowing using custom BoundField classes per form or even per project (instead of only per field as is already possible today). This would allow overriding css_classes, e.g. to add…
Read MoreSept. 13, 2024 » Matthias Kestenholz: Posts about Django » [Archived Version]
django-content-editor now supports nested sections django-content-editor (and it’s ancestor FeinCMS) has been the Django admin extension for editing content consisting of reusable blocks since 2009. In the last years we have more and more often started automatically grouping related items, e.g. for rendering a sequence of images as a gallery. But, sometimes it’s nice to give editors more control. This has been possible by using blocks which open a subsection and blocks which close a…
Read MoreSept. 11, 2024 » Matthias Kestenholz: Posts about Django » [Archived Version]
Weeknotes (2024 week 37) django-debug-toolbar alpha with async support! I have helped mentoring Aman Pandey who has worked all summer to add async support to django-debug-toolbar. Tim has released an alpha which contains all of the work up to a few days ago. Test it! Let’s find the breakages before the final release. Dropping Python 3.9 from my projects I have read Carlton’s post about the only green Python release and have started dropping Python 3.9 support from many of the packag…
Read MoreAug. 28, 2024 » Matthias Kestenholz: Posts about Django » [Archived Version]
Weeknotes (2024 week 35) Getting deep into htmx and django-template-partials I have been skeptical about htmx for some time because basically everything the library does is straightforward to do myself with a few lines of JavaScript. I am a convert now because, really, adding a few HTML attributes is nicer than copy pasting a few lines of JavaScript. Feels good. The combination of htmx with django-template-partials is great as well. I didn’t know I had been missing template partials until…
Read More