Fix for embedded template paths
When edting a custom node type we were building the wrong path, and not passing the project argument to the render_template function.
This commit is contained in:
parent
398bbbc316
commit
6edd0e2f8d
@ -448,9 +448,8 @@ def edit(node_id):
|
|||||||
else:
|
else:
|
||||||
attach_project_pictures(project, api)
|
attach_project_pictures(project, api)
|
||||||
|
|
||||||
template = '{0}/edit{1}.html'.format(node_type['name'], embed_string)
|
template = 'nodes/custom/{0}/edit{1}.html'.format(node_type['name'], embed_string)
|
||||||
# We should more simply check if the template file actually exsists on
|
# We should more simply check if the template file actually exists on the filesystem
|
||||||
# the filesystem level
|
|
||||||
try:
|
try:
|
||||||
return render_template(
|
return render_template(
|
||||||
template,
|
template,
|
||||||
@ -459,7 +458,8 @@ def edit(node_id):
|
|||||||
form=form,
|
form=form,
|
||||||
errors=form.errors,
|
errors=form.errors,
|
||||||
error=error,
|
error=error,
|
||||||
api=api)
|
api=api,
|
||||||
|
project=project,)
|
||||||
except TemplateNotFound:
|
except TemplateNotFound:
|
||||||
template = 'nodes/edit{1}.html'.format(node_type['name'], embed_string)
|
template = 'nodes/edit{1}.html'.format(node_type['name'], embed_string)
|
||||||
is_embedded_edit = True if embed_string else False
|
is_embedded_edit = True if embed_string else False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user