enforce static url path for tests

This commit is contained in:
Ali Abid 2020-11-02 06:53:30 -08:00
parent 1e4fefdcff
commit d4469a346a
4 changed files with 8 additions and 6 deletions

View File

@ -36,7 +36,8 @@ GRADIO_STATIC_ROOT = "https://gradio.app"
app = Flask(__name__,
template_folder=STATIC_TEMPLATE_LIB,
static_folder=STATIC_PATH_LIB)
static_folder=STATIC_PATH_LIB,
static_url_path="/static/")
CORS(app)
cache_buster = CacheBuster(config={'extensions': ['.js', '.css'], 'hash_size': 5})
cache_buster.init_app(app)

View File

@ -37,7 +37,7 @@
<link type="text/css" href="{{ vendor_prefix }}/static/css/vendor/jexcel.min.css" rel="stylesheet">
<link type="text/css" href="{{ vendor_prefix }}/static/css/vendor/jsuites.min.css" rel="stylesheet">
<link type="text/css" href="{{ vendor_prefix }}/static/css/vendor/jsonTree.css" rel="stylesheet">
<link type="text/css" href="{{ vendor_prefix }}/static/css/vendor/cropper.min.css" rel="stylesheet">
<link type="text/css" href="{{ vendor_prefix }}/static/css/vendor/cropper.min.css" rel="stylesheet">
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
@ -66,7 +66,7 @@
<body id="lib">
<div id="interface_target" class="container"></div>
<div id="credit"><a href="https://github.com/gradio-app/gradio" target="_blank">
<img src="static/img/logo_inline.png">
<img src="/static/img/logo_inline.png">
</a></div>
<!-- VENDOR -->
<script src="{{ vendor_prefix }}/static/js/vendor/jquery.min.js"></script>

View File

@ -36,7 +36,8 @@ GRADIO_STATIC_ROOT = "https://gradio.app"
app = Flask(__name__,
template_folder=STATIC_TEMPLATE_LIB,
static_folder=STATIC_PATH_LIB)
static_folder=STATIC_PATH_LIB,
static_url_path="/static/")
CORS(app)
cache_buster = CacheBuster(config={'extensions': ['.js', '.css'], 'hash_size': 5})
cache_buster.init_app(app)

View File

@ -37,7 +37,7 @@
<link type="text/css" href="{{ vendor_prefix }}/static/css/vendor/jexcel.min.css" rel="stylesheet">
<link type="text/css" href="{{ vendor_prefix }}/static/css/vendor/jsuites.min.css" rel="stylesheet">
<link type="text/css" href="{{ vendor_prefix }}/static/css/vendor/jsonTree.css" rel="stylesheet">
<link type="text/css" href="{{ vendor_prefix }}/static/css/vendor/cropper.min.css" rel="stylesheet">
<link type="text/css" href="{{ vendor_prefix }}/static/css/vendor/cropper.min.css" rel="stylesheet">
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
@ -66,7 +66,7 @@
<body id="lib">
<div id="interface_target" class="container"></div>
<div id="credit"><a href="https://github.com/gradio-app/gradio" target="_blank">
<img src="static/img/logo_inline.png">
<img src="/static/img/logo_inline.png">
</a></div>
<!-- VENDOR -->
<script src="{{ vendor_prefix }}/static/js/vendor/jquery.min.js"></script>