Skip to content

Commit

Permalink
v1_0
Browse files Browse the repository at this point in the history
  • Loading branch information
alexccastelo committed Nov 21, 2023
0 parents commit cf679d2
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 0 deletions.
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: gunicorn meu_site:app
25 changes: 25 additions & 0 deletions meu_site.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from flask import Flask, render_template

app = Flask(__name__)
# route -> hashtagtreinamentos.com/
# função -> o que você quer exibir naquela página
# template

@app.route("/")
def homepage():
return render_template("homepage.html")

@app.route("/contatos")
def contatos():
return render_template("contatos.html")

@app.route("/usuarios/<nome_usuario>")
def usuarios(nome_usuario):
return render_template("usuarios.html", nome_usuario=nome_usuario)

# colocar o site no ar
if __name__ == "__main__":
app.run(debug=True)

# servidor do heroku

8 changes: 8 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
click==8.0.1
colorama==0.4.4
Flask==2.0.1
gunicorn==20.1.0
itsdangerous==2.0.1
Jinja2==3.0.1
MarkupSafe==2.0.1
Werkzeug==2.0.1
12 changes: 12 additions & 0 deletions templates/contatos.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Contatos</title>
</head>
<body>
<p>Nossos contatos são:</p>
<p>E-mail: [email protected]</p>
<p>Telefone: (99) 99998888</p>
</body>
</html>
10 changes: 10 additions & 0 deletions templates/homepage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Home</title>
</head>
<body>
<p>Esse é meu 1º site. Lira, já me inscrevi no canal</p>
</body>
</html>
10 changes: 10 additions & 0 deletions templates/usuarios.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Perfil Usuario</title>
</head>
<body>
<p>Meu nome de usuário é: {{ nome_usuario }}</p>
</body>
</html>

0 comments on commit cf679d2

Please sign in to comment.