Django Templates: Implementing Custom Tags and Filters
You set up your project and wrote a view to use for testing. Then, you used built-in tags and filters as well as loaded tags from a library. In the previous section, you learned how to register tags and filters. In this section, you’re all set to write your first Django custom filter! Filters as Functions As mentioned previously, filters are Python functions. The most basic filters take a single argument: the value to filter. The result of a filter […]
Read more