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
fea5f2e8
Commit
fea5f2e8
authored
May 07, 2026
by
Hiago Rafael
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oi
parent
1b3c313b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
models.cpython-314.pyc
__pycache__/models.cpython-314.pyc
+0
-0
app.py
app.py
+6
-5
No files found.
__pycache__/models.cpython-314.pyc
View file @
fea5f2e8
No preview for this file type
app.py
View file @
fea5f2e8
from
flask
import
Flask
,
render_template
,
request
,
redirect
from
flask
import
Flask
,
render_template
,
request
,
redirect
from
models
import
Animal
from
models
import
Animal
...
@@ -10,6 +9,10 @@ animais = []
...
@@ -10,6 +9,10 @@ animais = []
def
index
():
def
index
():
return
render_template
(
'index.html'
,
animais
=
animais
)
return
render_template
(
'index.html'
,
animais
=
animais
)
@app.route
(
'/cadastro'
)
def
cadastro
():
return
render_template
(
'cadastro.html'
)
@app.route
(
'/adicionar'
,
methods
=
[
'POST'
])
@app.route
(
'/adicionar'
,
methods
=
[
'POST'
])
def
adicionar
():
def
adicionar
():
nome
=
request
.
form
[
'nome'
]
nome
=
request
.
form
[
'nome'
]
...
@@ -28,7 +31,4 @@ def excluir(id):
...
@@ -28,7 +31,4 @@ def excluir(id):
return
redirect
(
'/'
)
return
redirect
(
'/'
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
app
.
run
(
debug
=
True
)
app
.
run
(
debug
=
True
)
\ 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