Skip to content

0.7.1

Compare
Choose a tag to compare
@djc djc released this 23 Jul 13:08

Some nice new features are now available as part of Askama 0.7.1. The most important one is the ability to search multiple directories for template files. This works by adding an askama.toml file to the crate root and specifying the search directories in there (see the documentation). Now that there is a configuration mechanism, this may unlock other potential features that rely on some way to specify out-of-band configuration.

This release also adds optional support for actix-web. If you enable the with-actix-web feature, Template derives will include an impl for actix-web's Responder trait, so that you can trivially return template context structs from actix-web handlers.

  • Add support for multiple template directories (thanks to @mashedcode)
  • Add impl for actix-web Responder trait (thanks to @ryanmcgrath)
  • Add linebreaks and linebreaksbr filters (thanks to @Aaronepower)
  • Allow Template users to inspect template extension() (thanks to @ryanmcgrath)
  • derive(Template) is no longer restricted to named field struct types