Fixing relative path issue
This commit is contained in:
parent
a3fa83318e
commit
4dcc6f7c13
|
@ -1,13 +1,14 @@
|
|||
from flask import Blueprint, render_template, abort, redirect
|
||||
import os
|
||||
import json
|
||||
|
||||
import config
|
||||
|
||||
joyce = Blueprint('joyce', __name__)
|
||||
|
||||
manifest_path = config.MANIFEST_PATH
|
||||
with joyce.open_resource(manifest_path, 'r') as stats_json:
|
||||
assets = json.load(stats_json)
|
||||
manifest_path = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, config.MANIFEST_PATH))
|
||||
with joyce.open_resource(manifest_path, 'r') as assets_json:
|
||||
assets = json.load(assets_json)
|
||||
|
||||
@joyce.route('/', defaults={'path': ''})
|
||||
@joyce.route('/<path:path>')
|
||||
|
|
Loading…
Reference in New Issue