diff --git a/app.py b/app.py index 2538c7b..564b98f 100644 --- a/app.py +++ b/app.py @@ -30,7 +30,7 @@ def main(): return render_template('index.html') -@app.route('/inserir', methods=('GET', 'POST')) +@app.route('/inserir/', methods=('GET', 'POST')) def inserir(): if request.method == 'POST': @@ -52,7 +52,7 @@ def inserir(): return render_template('inserir.html', title='Adicionar contato') -@app.route('/listar') +@app.route('/listar/') def listar(): # exemplo de uma lista estática - sem consultar DB # contatos = [ @@ -81,7 +81,7 @@ def listar(): return render_template('listar.html', title='Listar', contatos=contatos) -@app.route('/editar', methods=('GET', 'POST')) +@app.route('/editar/', methods=('GET', 'POST')) def editar(): if request.method == 'GET': cid = str(request.args.get('id')) diff --git a/static/style.css b/static/style.css index fc0bb1b..865bae4 100644 --- a/static/style.css +++ b/static/style.css @@ -1,5 +1,12 @@ -body { background: #eee; } +/* body { background: #eee;} a, h1, h2 { color: #335da8; } .flash { background: #cee5F5; padding: 0.5em; border: 1px solid #aacbe2; } -.error { background: #f0d6d6; padding: 0.5em; } \ No newline at end of file +.error { background: #f0d6d6; padding: 0.5em; } */ +/* +.page-header { + background-color: #137977; + /* margin-top: 0; */ + /* padding: 20px 20px 20px 40px; + color: ghostwhite; +} */ \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 4dd8e13..6f2b3db 100644 --- a/templates/base.html +++ b/templates/base.html @@ -2,17 +2,40 @@
+ {% if title %}Error: {{ error }}{% endif %} -
+Error: {{ error }}{% endif %} +
+Error: {{ error }}{% endif %} -
+id | Nome | |
---|---|---|
{{ pessoa.id }} | @@ -15,7 +21,9 @@{{ pessoa.email }} |