Update
This commit is contained in:
parent
82f1bc477f
commit
221bc6c5ff
3 changed files with 20 additions and 3 deletions
6
app.py
6
app.py
|
|
@ -1,7 +1,7 @@
|
|||
import os
|
||||
import sys
|
||||
|
||||
from flask import Flask, request
|
||||
from flask import Flask, request, render_template
|
||||
from contextlib import closing
|
||||
from urllib.request import urlopen
|
||||
import json
|
||||
|
|
@ -23,8 +23,8 @@ def config(): # put application's code here
|
|||
|
||||
|
||||
@app.route('/')
|
||||
def hello_world(): # put application's code here
|
||||
return 'Hello World!'
|
||||
def index():
|
||||
return render_template('index.html')
|
||||
|
||||
|
||||
# Recherche d'une ville
|
||||
|
|
|
|||
6
static/css/style.css
Normal file
6
static/css/style.css
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
h1 {
|
||||
border: 2px #eee solid;
|
||||
color: red;
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
}
|
||||
11
templates/index.html
Normal file
11
templates/index.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename= 'css/style.css') }}">
|
||||
<title>Flask App</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Welcome to Flask</h1>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue