add a static file example

This commit is contained in:
Maxime Bloch 2019-09-20 15:02:28 +02:00
parent 9b3e71c496
commit a27a5e9370
No known key found for this signature in database
GPG Key ID: CE32A7D95B7D6418
4 changed files with 15 additions and 5 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
__pycache__/
venv/
.tern-port

3
watcher/static/hello.js Normal file
View File

@ -0,0 +1,3 @@
function sayHello() {
alert("Hello World");
}

3
watcher/static/index.css Normal file
View File

@ -0,0 +1,3 @@
h1 {
color: blue;
}

View File

@ -1,7 +1,10 @@
<html>
<head>
</head>
<body>
<h1>TEST</h1>
</body>
<head>
<script type = "text/javascript"
src = "{{ url_for('static', filename = 'hello.js') }}" ></script>
</head>
<body>
<input type = "button" onclick = "sayHello()" value = "Say Hello" />
</body>
</html>