defunkt / pystache

Mustache in Python
http://mustache.github.com/
MIT License
1.31k stars 308 forks source link

use `load_file` instead of `read` in renderer #155

Closed BigBlueHat closed 11 years ago

BigBlueHat commented 11 years ago

load_file takes search_dirs into account, so it properly discovers templates when using search_dirs--read uses leans on common.read which does not handle search_dirs

cjerdonek commented 11 years ago

This change is in reference to the render_path method, whose docstring reads, "Render the template at the given path using the given context." In other words, the render_path method reads what is at the explicitly provided path, so it doesn't need to take into account search_dirs. The render_name method, however, does. Does that make sense?

BigBlueHat commented 11 years ago

@cjerdonek I totally missed the render_name method. Thanks!