From c4645f24b0929b2f83d836b0679896cf840d7ac2 Mon Sep 17 00:00:00 2001 From: Jon <31494475+jonioni@users.noreply.github.com> Date: Fri, 21 Sep 2018 01:04:48 -0400 Subject: [PATCH] Supporting Partial File Without File Extension Change made to function `_get_partial_ext`: From `path = partials_path + '/' + name + '.' + partials_ext` to `path = partials_path + '/' + name + ('.' + partials_ext if partials_ext else '')`. --- chevron/renderer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chevron/renderer.py b/chevron/renderer.py index 3c284d1..c6b19e9 100644 --- a/chevron/renderer.py +++ b/chevron/renderer.py @@ -90,7 +90,7 @@ def _get_partial(name, partials_dict, partials_path, partials_ext): # Nope... try: # Maybe it's in the file system - path = partials_path + '/' + name + '.' + partials_ext + path = partials_path + '/' + name + ('.' + partials_ext if partials_ext else '') with open(path, 'r') as partial: return partial.read() -- 2.47.3