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
d865bf4c
Commit
d865bf4c
authored
May 07, 2026
by
Ian Gustavo
Browse files
Options
Browse Files
Download
Plain Diff
resolvendo conflitos e atualizando pastas
parents
6811033b
35090024
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
144 additions
and
9 deletions
+144
-9
models.cpython-313.pyc
__pycache__/models.cpython-313.pyc
+0
-0
models.py
models.py
+11
-7
style
static/style
+129
-0
cadastro.html
templates/cadastro.html
+1
-0
index.html
templates/index.html
+3
-1
style
templates/style
+0
-1
No files found.
__pycache__/models.cpython-313.pyc
View file @
d865bf4c
No preview for this file type
models.py
View file @
d865bf4c
class
Animal
:
from
flask_sqlalchemy
import
SQLAlchemy
def
__init__
(
self
,
nome
,
especie
,
idade
,
peso
):
self
.
nome
=
nome
db
=
SQLAlchemy
()
self
.
especie
=
especie
self
.
idade
=
idade
class
Animal
(
db
.
Model
):
self
.
peso
=
peso
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
)
\ No newline at end of file
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
static/style
0 → 100644
View file @
d865bf4c
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, Helvetica, sans-serif;
background-color: #f4f7f2;
color: #333;
padding: 40px;
}
h1 {
text-align: center;
margin-bottom: 30px;
color: #2d6a4f;
font-size: 36px;
}
a {
text-decoration: none;
transition: 0.3s;
}
a[href="/cadastro"] {
display: inline-block;
background-color: #40916c;
color: white;
padding: 12px 20px;
border-radius: 8px;
margin-bottom: 25px;
font-weight: bold;
}
a[href="/cadastro"]:hover {
background-color: #2d6a4f;
}
ul {
list-style: none;
max-width: 800px;
margin: auto;
}
li {
background-color: white;
padding: 18px;
margin-bottom: 15px;
border-radius: 10px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
display: flex;
justify-content: space-between;
align-items: center;
font-size: 18px;
}
li a {
background-color: #d62828;
color: white;
padding: 8px 14px;
border-radius: 6px;
font-size: 14px;
}
li a:hover {
background-color: #a4161a;
}
form {
background-color: white;
max-width: 450px;
margin: auto;
padding: 30px;
border-radius: 12px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
input {
width: 100%;
padding: 12px;
border: 1px solid #ccc;
border-radius: 8px;
font-size: 16px;
}
button {
width: 100%;
padding: 12px;
border: none;
border-radius: 8px;
background-color: #40916c;
color: white;
font-size: 16px;
font-weight: bold;
cursor: pointer;
transition: 0.3s;
}
button:hover {
background-color: #2d6a4f;
}
body > a {
display: block;
text-align: center;
margin-top: 20px;
color: #2d6a4f;
font-weight: bold;
}
body > a:hover {
color: #1b4332;
}
\ No newline at end of file
templates/cadastro.html
View file @
d865bf4c
<link
rel=
"stylesheet"
href=
"{{ url_for('static', filename='style.css') }}"
>
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
<head>
<head>
...
...
templates/index.html
View file @
d865bf4c
<link
rel=
"stylesheet"
href=
"{{ url_for('static', filename='style.css') }}"
>
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
<head>
<head>
<title>
Lista de Animais
</title>
<title>
Lista de Animais
</title>
<link
rel=
"stylesheet"
href=
"{{ url_for('static', filename='style.css') }}"
>
</head>
</head>
<body>
<body>
...
@@ -13,7 +15,7 @@
...
@@ -13,7 +15,7 @@
{% for animal in animais %}
{% for animal in animais %}
<li>
<li>
{{ animal.nome }} - {{ animal.especie }} - {{ animal.idade }} anos - {{ animal.peso }} kg
{{ animal.nome }} - {{ animal.especie }} - {{ animal.idade }} anos - {{ animal.peso }} kg
<a
href=
"/excluir/{{
loop.index0
}}"
>
❌ Excluir
</a>
<a
href=
"/excluir/{{
animal.id
}}"
>
❌ Excluir
</a>
</li>
</li>
{% endfor %}
{% endfor %}
</ul>
</ul>
...
...
templates/style
View file @
d865bf4c
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
padding: 0;
padding: 0;
box-sizing: border-box;
box-sizing: border-box;
}
}
/* BODY */
/* BODY */
body {
body {
font-family: 'Segoe UI', sans-serif;
font-family: 'Segoe UI', sans-serif;
...
...
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