Django: Introducing Djade, a template formatter| adamj.eu
When we write custom management commands, it’s easy to write integration tests for them with call_command(). This allows us to invoke the management command as it runs under manage.py, and retrieve the return code, standard output, and standard error. It’s great, but has some overhead, making our tests slower than necessary. If we have logic separated out of the command’s handle() method, it improves both readability and testability, as we can unit test it separately.| adamj.eu
Django requires every change to model fields and meta classes to be reflected in database migrations. This applies even to things that don’t typically affect the database, such as Field.choices. When iterating on code, it’s easy to make a model change and forget to update the migrations accordingly. If you don’t have any protection, you might even deploy code that crashes due to out-of-date migrations!| adamj.eu
Source code: Lib/argparse.py Tutorial: This page contains the API reference information. For a more gentle introduction to Python command-line parsing, have a look at the argparse tutorial. The arg...| Python documentation
🚀 Updated April 4th 2024. See the update post.This book covers the best command line Git tools, techniques, tips, tricks, and tactical tidbits I’ve encountered from 11.5 years of using Git. The selection reflects my preferences for well-maintained tools that provide high value with little need for customization.Note that this book is not an introduction to Git and assumes that you’re already using Git on a daily basis. It offers ways to improve your developer experience with Git that u...| Gumroad
3.53K Posts, 424 Following, 1.7K Followers · :django: #Django blogger and contributor ✍️ Author of three books on Django and Git 🍕 Django London co-organizer 🇬🇧 London / 🇵🇹 Lisbon| Fosstodon