add a static file example
This commit is contained in:
parent
9b3e71c496
commit
a27a5e9370
4 changed files with 15 additions and 5 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
__pycache__/
|
__pycache__/
|
||||||
venv/
|
venv/
|
||||||
|
.tern-port
|
||||||
|
|
3
watcher/static/hello.js
Normal file
3
watcher/static/hello.js
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
function sayHello() {
|
||||||
|
alert("Hello World");
|
||||||
|
}
|
3
watcher/static/index.css
Normal file
3
watcher/static/index.css
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
h1 {
|
||||||
|
color: blue;
|
||||||
|
}
|
|
@ -1,7 +1,10 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
</head>
|
<script type = "text/javascript"
|
||||||
<body>
|
src = "{{ url_for('static', filename = 'hello.js') }}" ></script>
|
||||||
<h1>TEST</h1>
|
</head>
|
||||||
</body>
|
|
||||||
|
<body>
|
||||||
|
<input type = "button" onclick = "sayHello()" value = "Say Hello" />
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue