Locked lesson.
About this lesson
Filters allow us to work with our variables within a Django project. In this lesson, we'll learn how filters work and how to use them.
Exercise files
Download this lesson’s related exercise files.
20 - filters.docx57.2 KB Filters - Solution.docx
57.6 KB
Quick reference
Filters
Filters allow us to do transformative things to our variables using the Django Template Language.
When to use
Use them whenever you want to programatically transform a variable on a webpage.
Instructions
To find a list of the main filters, head to:
https://docs.djangoproject.com/en/3.0/ref/templates/language/#filters
as well as:
https://docs.djangoproject.com/en/3.0/ref/templates/builtins/#ref-templates-builtins-filters
Hints & tips
- https://docs.djangoproject.com/en/3.0/ref/templates/language/#filters
- https://docs.djangoproject.com/en/3.0/ref/templates/builtins/#ref-templates-builtins-filters
Lesson notes are only available for subscribers.