diff piecrust/baking/single.py @ 515:16e705c58cae

internal: Improve handling of taxonomy term slugification. This paves the way to bring slugification options like transliteration to PieCrust. This change mostly makes sure we use one-way slugification, which means, for serving/previewing, we need to slugify each page's terms to compare to the stuff captured from the URL. It also simplifies things a bit in the code.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 26 Jul 2015 23:16:15 -0700
parents eb3ace870708
children 59268b4d8c71
line wrap: on
line diff
--- a/piecrust/baking/single.py	Sun Jul 26 23:05:04 2015 -0700
+++ b/piecrust/baking/single.py	Sun Jul 26 23:16:15 2015 -0700
@@ -157,8 +157,7 @@
     def _bakeSingle(self, qualified_page, num, out_path, tax_info=None):
         ctx = PageRenderingContext(qualified_page, page_num=num)
         if tax_info:
-            tax = self.app.getTaxonomy(tax_info.taxonomy_name)
-            ctx.setTaxonomyFilter(tax, tax_info.term)
+            ctx.setTaxonomyFilter(tax_info.term)
 
         rp = render_page(ctx)