Fix css URL.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 16 Sep 2015 11:57:53 +0000 (13:57 +0200)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 16 Sep 2015 11:57:53 +0000 (13:57 +0200)
app.py
templates/index.html
templates/output.html

diff --git a/app.py b/app.py
index a2cd8de..d3490cd 100755 (executable)
--- a/app.py
+++ b/app.py
@@ -67,7 +67,7 @@ def launch():
         sys.stdout = sys.__stdout__
         sys.stderr = sys.__stderr__
 
-        return render_template('output.html', result = out[0].getvalue(), stderr = out[1].getvalue(), error = error)
+        return render_template('output.html', result=out[0].getvalue(), stderr=out[1].getvalue(), error=error, css_url=url_for('static', filename='style.css'))
 
     form = SubmitForm()
 
@@ -76,7 +76,7 @@ def launch():
     form.tests.choices = [(t, t) for t in tests_all]
     form.tests.data = [(t) for t in tests_default]
 
-    return render_template('index.html', form = form)
+    return render_template('index.html', form=form, css_url=url_for('static', filename='style.css'))
 
 
 if __name__ == '__main__':
index 9f0424e..ce7a41e 100644 (file)
@@ -3,7 +3,7 @@
 
 <head>
     <title>OCCI Compliance Tests</title>
-    <link rel="stylesheet" type="text/css" href="static/style.css"/>
+    <link rel="stylesheet" type="text/css" href="{{ css_url}}"/>
     <script>
         function tests_all(state) {
             checkboxes = document.getElementsByName('tests')
index d931ca1..f3b11f3 100644 (file)
@@ -3,7 +3,7 @@
 
 <head>
     <title>OCCI Compliance Tests</title>
-    <link rel="stylesheet" type="text/css" href="static/style.css"/>
+    <link rel="stylesheet" type="text/css" href="{{css_url}}"/>
 </head>
 
 <body>