Merge pull request #1314 from chenl/issue_1310

issue#1310
This commit is contained in:
mdipierro
2016-05-02 10:16:03 -05:00

View File

@@ -676,8 +676,8 @@ def run_view_in(environment):
else:
filename = pjoin(folder, 'views', view)
if os.path.exists(path): # compiled views
x = view.replace('/', '.')
files = ['views.%s.pyc' % x]
x = view.replace('/', '_')
files = ['views_%s.pyc' % x]
is_compiled = os.path.exists(pjoin(path, files[0]))
# Don't use a generic view if the non-compiled view exists.
if is_compiled or (not is_compiled and not os.path.exists(filename)):