Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CRUD_Animais_da_Fazenda2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hiago Rafael
CRUD_Animais_da_Fazenda2
Commits
3ff43ebd
Commit
3ff43ebd
authored
May 07, 2026
by
Ian Gustavo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oi
parent
be939fef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
app.py
app.py
+2
-7
No files found.
app.py
View file @
3ff43ebd
...
...
@@ -9,18 +9,13 @@ animais = []
def
index
():
return
render_template
(
'index.html'
,
animais
=
animais
)
@app.route
(
'/cadastro'
)
def
cadastro
():
return
render_template
(
'cadastro.html'
)
@app.route
(
'/adicionar'
,
methods
=
[
'POST'
])
def
adicionar
():
nome
=
request
.
form
[
'nome'
]
especie
=
request
.
form
[
'especie
'
]
tipo
=
request
.
form
[
'tipo
'
]
idade
=
request
.
form
[
'idade'
]
peso
=
request
.
form
[
'peso'
]
novo_animal
=
Animal
(
nome
,
especie
,
idade
,
peso
)
novo_animal
=
Animal
(
nome
,
tipo
,
idade
)
animais
.
append
(
novo_animal
)
return
redirect
(
'/'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment