Custom template tags in Django
Learn how you can extend the Django template engine by defining custom template tags using Python, and then make them available to your templates using the {% load %} tag.
Learn how you can extend the Django template engine by defining custom template tags using Python, and then make them available to your templates using the {% load %} tag.
This article covers 6 common methods found in the Django Database API for creating, retrieving, and updating records.
A useful built in function in Python is hasattr(). This function is used to test if an object has some attribute. hasattr() returns True if the object you specify contains a particular attribute and False if it does not. hasattr() syntax: hasattr() takes two parameters: object. The object whose attribute you want to check attribute. …
In this post, I am going to go down memory lane and talk about my contributions to one of the open source communities I contribute to: Mozilla.
Python does not have a switch or case statement. See how to use dictionaries to emulate them.
Learn how to avoid repetition and write simpler and easy to read tests using the pytest parametrization feature.
Learn how to install pytest and use it to discover, run, and skip test functions.
PyCharm supports remote development. Learn how to set it up in this article.
Have you ever wondered how you can use Python to work with groups of files? I wrote a comprehensive article on this for Real Python. You can find the article here. In the article, I cover differences between modules such as fnmatch, pathlib and os. In addition to that, you will learn how to create, …