@adamchainz@fosstodon.org
@adamchainz@fosstodon.org avatar

adamchainz

@adamchainz@fosstodon.org

:django: #Django technical board member
🍕 London Django Meetup Organizer with https://fosstodon.org/@cgl
✍️ Author of three books on Django and Git
🇬🇧 London / 🇵🇹 Lisbon

This profile is from a federated server and may be incomplete. Browse more on the original instance.

adamchainz, to random
@adamchainz@fosstodon.org avatar

Reminder: self-host your scripts rather than using JavaScript CDNs like jsdelivr or unpkg

https://blog.wesleyac.com/posts/why-not-javascript-cdn

adamchainz, to random
@adamchainz@fosstodon.org avatar

Be sure to check your kid's candy this year! I found an unreviewable gigantic PR.

adamchainz, (edited ) to random
@adamchainz@fosstodon.org avatar

Would you rather...

adamchainz, to django
@adamchainz@fosstodon.org avatar

✍️ New post on a little investigation into #Django templates’ string_if_invalid option

https://adamj.eu/tech/2023/08/09/django-perils-string-if-invalid/

adamchainz, to django
@adamchainz@fosstodon.org avatar

I just wrote this proposal that ’s third-party package tutorial recommend using a django_ module prefix to prevent name collisions, such as the historical one between django-ratelimit and ratelimit.

What do you think?

https://forum.djangoproject.com/t/change-reusable-apps-naming-recommendation/25233

adamchainz, to django
@adamchainz@fosstodon.org avatar

✍️ New post on joining the community on

💁‍♂️ Share with your non-Fediversing friends!

https://adamj.eu/tech/2024/02/10/django-join-community-mastodon/

adamchainz, to python
@adamchainz@fosstodon.org avatar

✍️ New post covering a “diffing” unit test in , which checks copy-paste-tweaked code is in sync with the upstream library.

I used this technique recently on a upgrade and I’m curious if anyone else has done similar.

https://adamj.eu/tech/2024/04/26/python-diffing-unit-test/

adamchainz, to django
@adamchainz@fosstodon.org avatar

✍️ New post on my new package django-harlequin.

🦆 This package provides a small launcher command for Harlequin, the Terminal-based SQL IDE by Ted Conbeer.

💽 Try it out and let me know what you think!

https://adamj.eu/tech/2024/05/07/django-harlequin/

adamchainz, to django
@adamchainz@fosstodon.org avatar

Can you see why this code is suboptimal?

🧵

adamchainz, to python
@adamchainz@fosstodon.org avatar

🚀 I have just released a major update to my book Boost Your Django DX.

✍️ This update contains new content, a bunch of edits, and uses the latest versions of tools, including 3.12 and 5.0.

🙏 In the two years since I published the first version, I have learned a lot from the Python and Django communities. I’ve added and edited several sections to reflect these new ideas.

adamchainz, to django
@adamchainz@fosstodon.org avatar

🍞 In 2018, I updated the contributor tutorial to walk readers through an imaginary ticket adding a make_toast() function.

So far, about 60 new contributors have accidentally made a full PR with their results: https://github.com/django/django/pulls?q=is%3Apr+toast+is%3Aclosed

I bet you some future LLM product will recommend adding django.make_toast() for real because it looks like such a popular suggestion!

adamchainz, (edited ) to random
@adamchainz@fosstodon.org avatar

When it comes to merge conflicts, would you rather fix…

adamchainz, to random
@adamchainz@fosstodon.org avatar

tfw you spot something else to fix and use stash

adamchainz, to django
@adamchainz@fosstodon.org avatar

✍️ New post describing how to sanitize HTML fragments in forms using the newer nh3 package (Bleach replacement).

https://adamj.eu/tech/2023/12/13/django-sanitize-incoming-html-nh3/

adamchainz, to random
@adamchainz@fosstodon.org avatar

Boost your Git DX has been added to the book section on the website 😊

https://git-scm.com/doc/ext

adamchainz, to python
@adamchainz@fosstodon.org avatar

🥳 The open source projects I maintain now use pyproject.toml instead of setup.cfg!

Docs: https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html

adamchainz, to random
@adamchainz@fosstodon.org avatar

hard truth

adamchainz, to python
@adamchainz@fosstodon.org avatar

🏎️ Last night, I fixed a segmentation fault bug in my testing library time-machine.

🤷 There were several outstanding issues about segmentation faults with unclear causes, and I didn’t have time to dive into them.

🐛 Then I received a new bug report from Marcin Sulikowski with a minimal reproduction. This research pointed directly at the problem and revealed the other reports as duplicates.

👏 Clear and reproducible bug reports are very valuable contributions!

adamchainz, (edited ) to python
@adamchainz@fosstodon.org avatar

🕺 From 3.13, virtual environments created by venv will come with a ignore file, thanks to @brettcannon ’s PR merged yesterday. There’ll be no need to add .venv (or whatever) to your .gitignore file then..

FYI the virtualenv package already does this 😁

https://github.com/python/cpython/commit/e218e5022eef369573808a4f8dda9aeeab663750

adamchainz, to django
@adamchainz@fosstodon.org avatar

The best URL structure

adamchainz, to python
@adamchainz@fosstodon.org avatar

✍️ New post introducing my new plugin that checks your usage of ’s logging module.

https://adamj.eu/tech/2023/09/07/introducing-flake8-logging/

adamchainz, to django
@adamchainz@fosstodon.org avatar

✍️ New short post with a macOS GeoDjango tip

🌍 Getting to load the GDAL/GEOS libraries can be tricky. I’ve tried several options and found using symlinks in /usr/local/lib to be the best.

https://adamj.eu/tech/2024/03/20/django-homebrew-gdal-geos/

adamchainz, to random
@adamchainz@fosstodon.org avatar

Yay, updated their docs to recommend the ~/.config/git/ignore for ’s global ignore file over ~/.gitignore_global. Using ~/.config is a standard, avoids cluttering your home directory, and requires no extra configuration.

https://github.com/github/docs/pull/27557/files#diff-2a8f34713f64309f250baf7c6789a9be7fef24b6f2a25c5911ab1d7806d99663L44

adamchainz, (edited ) to random
@adamchainz@fosstodon.org avatar

Do you know what a binary search is?

adamchainz, to random
@adamchainz@fosstodon.org avatar

♦️ There is a safer alternative to 'git push --force'!

🫸 Use --force-with-lease and --force-if-includes to restrict force pushes so that they don’t unintentionally overwrite commits pushed by others.

Explained in my post: https://adamj.eu/tech/2023/10/31/git-force-push-safely/

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • modclub
  • everett
  • rosin
  • Youngstown
  • slotface
  • ethstaker
  • mdbf
  • kavyap
  • osvaldo12
  • DreamBathrooms
  • anitta
  • Durango
  • ngwrru68w68
  • tester
  • khanakhh
  • love
  • tacticalgear
  • cubers
  • GTA5RPClips
  • Leos
  • normalnudes
  • provamag3
  • cisconetworking
  • JUstTest
  • All magazines