Chapter 9. Using Built-in Template Filters to Enhance Views

What You’ll Learn in This Hour

  • How to apply filters in templates
  • How to format text using filters
  • How to create and manipulate lists using filters
  • How to sort a list of dictionaries in a template
  • How to format dates using filters

Django provides a robust library of built-in filters that you can use to manipulate data inside templates. In this hour, you will learn how to use filters to manipulate data that is rendered inside templates.

As you understand and use filters, you will see that they provide several necessary features that are needed when rendering data into HTML responses. The following sections will help you understand filters and how to use them to format text, manipulate lists, ...

Get Sams Teach Yourself Django in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.