Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
crud-animais-fazenda
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
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
Nicoly Aparecida Lopes
crud-animais-fazenda
Commits
2247515b
Commit
2247515b
authored
Apr 16, 2026
by
Maria Eduarda Afonso da Silva
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'main' of
http://gitlab.ariquemes.ifro.edu.br/2024105070049/crud-animais-fazenda
parents
afd45c0b
96c7ba70
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
22 deletions
+3
-22
app.py
app.py
+3
-22
sobre.html
templates/sobre.html
+0
-0
No files found.
app.py
View file @
2247515b
...
...
@@ -9,27 +9,8 @@ db.init_app(app)
with
app
.
app_context
():
db
.
create_all
()
# LISTAR (página inicial)
# BEATRYZ — LISTAR
@app.route
(
'/'
)
def
index
():
animais
=
Animal
.
query
.
all
()
return
render_template
(
'index.html'
,
animais
=
animais
)
# EDITAR (Nicoly)
@app.route
(
'/editar/<int:id>'
,
methods
=
[
'GET'
,
'POST'
])
def
editar
(
id
):
animal
=
Animal
.
query
.
get
(
id
)
if
request
.
method
==
'POST'
:
animal
.
nome
=
request
.
form
[
'nome'
]
animal
.
especie
=
request
.
form
[
'especie'
]
animal
.
idade
=
int
(
request
.
form
[
'idade'
])
animal
.
peso
=
float
(
request
.
form
[
'peso'
])
db
.
session
.
commit
()
return
redirect
(
'/'
)
return
render_template
(
'editar.html'
,
animal
=
animal
)
if
__name__
==
'__main__'
:
app
.
run
(
debug
=
True
)
\ No newline at end of file
return
render_template
(
'index.html'
,
animais
=
animais
)
\ No newline at end of file
templates/sobre.html
deleted
100644 → 0
View file @
afd45c0b
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