adding application_root to preview/pdf iframe urls
This commit is contained in:
parent
a7ad64562c
commit
0e7a9c1d45
@ -130,13 +130,13 @@ def stylesheet(name):
|
|||||||
|
|
||||||
@APP.route('/<name>/html/')
|
@APP.route('/<name>/html/')
|
||||||
def html(name):
|
def html(name):
|
||||||
path = os.path.join(f'/{ name }/', 'preview.html')
|
url = os.path.join(APP.config["APPLICATION_ROOT"], f'/{ name }/', 'preview.html')
|
||||||
return render_template('iframe.html', url=path, name=name.strip(), application_root=APP.config["APPLICATION_ROOT"])
|
return render_template('iframe.html', url=url, name=name.strip(), application_root=APP.config["APPLICATION_ROOT"])
|
||||||
|
|
||||||
@APP.route('/<name>/pdf/')
|
@APP.route('/<name>/pdf/')
|
||||||
def pdf(name):
|
def pdf(name):
|
||||||
path = os.path.join(f'/{ name }/', 'pagedjs.html')
|
url = os.path.join(APP.config["APPLICATION_ROOT"], f'/{ name }/', 'pagedjs.html')
|
||||||
return render_template('pdf.html', url=path, name=name.strip(), application_root=APP.config["APPLICATION_ROOT"])
|
return render_template('pdf.html', url=url, name=name.strip(), application_root=APP.config["APPLICATION_ROOT"])
|
||||||
|
|
||||||
# //////////////////
|
# //////////////////
|
||||||
# RENDERED RESOURCES
|
# RENDERED RESOURCES
|
||||||
|
Loading…
Reference in New Issue
Block a user