Fixing relative path issue

This commit is contained in:
Alex Hunt 2018-11-27 00:20:50 -08:00
parent a3fa83318e
commit 4dcc6f7c13
1 changed files with 4 additions and 3 deletions

View File

@ -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>')