Django Admin Project: How to Add Custom ‘Actions’ (Export to CSV)
You’ve customized your Django Admin, but it has a hidden power: “Actions.” An action is a function you can run on all selected items in…

You’ve customized your Django Admin, but it has a hidden power: “Actions.” An action is a function you can run on all selected items in…

You already use f-strings to put variables in text: f"Hello, {name}!" But f-strings are far more powerful than that. In this article, we’ll look at…

For decades, Python developers manipulated file paths using the os module. This Python pathlib guide aims to introduce a more modern and efficient approach to…

What if you want to automatically send a welcome email every time a new user signs up? Or create a User Profile the instant a…

This is the most famous “gotcha” in all of Python: the Mutable Default Argument bug. It’s a bug that confuses every developer exactly once. Look…

You’ve built dozens of projects. To publish your package and make it easy for others to install, you’ll need to understand how to use Python…

This error looks scary, but it’s actually a helpful message from a developer. In Python, the NotImplementedError is not a bug; it’s a feature of…

In our intro to pytest, we learned how to use simple assert statements. But what if all your tests need the same setup data? You…

In our unittest guide, we learned how to write automated tests. This Python pytest guide will help you get started with the preferred testing tool….

If you’ve ever worked with huge files or infinite sequences, you’ve needed a generator. The keyword that powers them is yield. In this article, you’ll…