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
bf7a2854
Commit
bf7a2854
authored
May 07, 2026
by
Ian Gustavo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atualizei muito ai
parent
3bd092d4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
models.cpython-313.pyc
__pycache__/models.cpython-313.pyc
+0
-0
models.py
models.py
+8
-0
cadastro.html
templates/cadastro.html
+3
-2
No files found.
__pycache__/models.cpython-313.pyc
View file @
bf7a2854
No preview for this file type
models.py
View file @
bf7a2854
...
...
@@ -8,3 +8,10 @@ class Animal(db.Model):
especie
=
db
.
Column
(
db
.
String
(
50
),
nullable
=
False
)
idade
=
db
.
Column
(
db
.
Integer
,
nullable
=
False
)
peso
=
db
.
Column
(
db
.
Float
,
nullable
=
False
)
# ADICIONA ISTO AQUI EM BAIXO:
def
__init__
(
self
,
nome
,
especie
,
idade
,
peso
=
0.0
):
self
.
nome
=
nome
self
.
especie
=
especie
self
.
idade
=
idade
self
.
peso
=
peso
\ No newline at end of file
templates/cadastro.html
View file @
bf7a2854
...
...
@@ -8,14 +8,15 @@
<h1>
Cadastrar Animal
</h1>
<form
action=
"/adicionar"
method=
"POST"
>
<
<
form
action=
"/adicionar"
method=
"POST"
>
<input
type=
"text"
name=
"nome"
placeholder=
"Nome"
required
><br><br>
<input
type=
"text"
name=
"
especie"
placeholder=
"Espécie
"
required
><br><br>
<input
type=
"text"
name=
"
tipo"
placeholder=
"Espécie/Tipo
"
required
><br><br>
<input
type=
"number"
name=
"idade"
placeholder=
"Idade"
required
><br><br>
<input
type=
"number"
step=
"0.1"
name=
"peso"
placeholder=
"Peso (kg)"
required
><br><br>
<button
type=
"submit"
>
Salvar
</button>
</form>
<br>
<a
href=
"/"
>
⬅ Voltar
</a>
...
...
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