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
f81a95f4
Commit
f81a95f4
authored
Apr 30, 2026
by
Hiago Rafael
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sa fazendo umas coisas
parent
a9722466
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
4 deletions
+37
-4
app.py
app.py
+31
-2
models.py
models.py
+6
-2
No files found.
app.py
View file @
f81a95f4
asdkgasfdy
afsoudu
gasyud
asfld
asn
,
dvbasb7yuamshv
asoluyhas
dluha
v
,
asbnd
asluy
from
flask
import
Flask
,
render_template
,
request
,
redirect
\ No newline at end of file
from
models
import
Animal
app
=
Flask
(
__name__
)
animais
=
[]
@app.route
(
'/'
)
def
index
():
return
render_template
(
'index.html'
,
animais
=
animais
)
@app.route
(
'/adicionar'
,
methods
=
[
'POST'
])
def
adicionar
():
nome
=
request
.
form
[
'nome'
]
tipo
=
request
.
form
[
'tipo'
]
idade
=
request
.
form
[
'idade'
]
novo_animal
=
Animal
(
nome
,
tipo
,
idade
)
animais
.
append
(
novo_animal
)
return
redirect
(
'/'
)
@app.route
(
'/excluir/<int:id>'
)
def
excluir
(
id
):
if
0
<=
id
<
len
(
animais
):
animais
.
pop
(
id
)
return
redirect
(
'/'
)
if
__name__
==
'__main__'
:
app
.
run
(
debug
=
True
)
\ No newline at end of file
models.py
View file @
f81a95f4
dklashd
uiasdksajmbd
sadkasudjfva
snbd
askdsaduasyfd
askmndbs
avkuyds
vdkh
asg
fsd
class
Animal
:
\ No newline at end of file
def
__init__
(
self
,
nome
,
tipo
,
idade
):
self
.
nome
=
nome
self
.
tipo
=
tipo
self
.
idade
=
idade
\ No newline at end of file
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