Mercurial > piecrust2
comparison piecrust/serving/server.py @ 520:bab91fcef741
bake/serve: Improve support for unicode, add slugification options.
* Add slugification options for taxonomies.
* Sort out some unicode support problems on OSX.
* Add tests.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 28 Jul 2015 18:34:21 -0700 |
parents | c7e8b4a5afe3 |
children | b22e69ff54f4 |
comparison
equal
deleted
inserted
replaced
519:9d1a89cd8146 | 520:bab91fcef741 |
---|---|
343 render_ctx = PageRenderingContext(qp, | 343 render_ctx = PageRenderingContext(qp, |
344 page_num=page_num, | 344 page_num=page_num, |
345 force_render=True) | 345 force_render=True) |
346 if taxonomy_info is not None: | 346 if taxonomy_info is not None: |
347 _, tax_terms = taxonomy_info | 347 _, tax_terms = taxonomy_info |
348 render_ctx.setTaxonomyFilter(tax_terms) | 348 render_ctx.setTaxonomyFilter(tax_terms, needs_slugifier=True) |
349 | 349 |
350 # See if this page is known to use sources. If that's the case, | 350 # See if this page is known to use sources. If that's the case, |
351 # just don't use cached rendered segments for that page (but still | 351 # just don't use cached rendered segments for that page (but still |
352 # use them for pages that are included in it). | 352 # use them for pages that are included in it). |
353 uri = qp.getUri() | 353 uri = qp.getUri() |