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
561814ce
Commit
561814ce
authored
May 07, 2026
by
Hiago Rafael
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'main' of
http://gitlab.ariquemes.ifro.edu.br/2024105070069/CRUD_Animais_da_Fazenda2
parents
d23c2656
ea3d6c8e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
models.cpython-313.pyc
__pycache__/models.cpython-313.pyc
+0
-0
models.py
models.py
+9
-2
cadastro.html
templates/cadastro.html
+3
-2
No files found.
__pycache__/models.cpython-313.pyc
View file @
561814ce
No preview for this file type
models.py
View file @
561814ce
...
...
@@ -7,4 +7,11 @@ class Animal(db.Model):
nome
=
db
.
Column
(
db
.
String
(
100
),
nullable
=
False
)
especie
=
db
.
Column
(
db
.
String
(
50
),
nullable
=
False
)
idade
=
db
.
Column
(
db
.
Integer
,
nullable
=
False
)
peso
=
db
.
Column
(
db
.
Float
,
nullable
=
False
)
\ No newline at end of file
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 @
561814ce
...
...
@@ -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