Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CRUD_Animais_da_Fazenda
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
7
Issues
7
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_Fazenda
Commits
9dcf271a
You need to sign in or sign up before continuing.
Commit
9dcf271a
authored
Apr 09, 2026
by
Hiago Rafael
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Criando telas HTML: base, cadastro, lista e editar
parent
6b5a9e8a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
11 deletions
+85
-11
.gitignore
.gitignore
+2
-0
base.html
templates/base.html
+18
-6
cadastro.html
templates/cadastro.html
+12
-5
editar.html
templates/editar.html
+20
-0
lista.html
templates/lista.html
+33
-0
No files found.
.gitignore
0 → 100644
View file @
9dcf271a
env/
*.db
templates/base.html
View file @
9dcf271a
<!DOCTYPE html>
<meta
charset=
"UTF-8"
>
<html>
<title>
Fazenda 🐄
</title>
<head>
<title>
Fazenda
</title>
<link
rel=
"stylesheet"
href=
"{{ url_for('static', filename='css/style.css') }}"
>
<link
rel=
"stylesheet"
href=
"{{ url_for('static', filename='css/style.css') }}"
>
</head>
</head>
<body>
<body>
<h1>
Sistema da Fazenda 🐄
</h1>
{% block content %}{% endblock %}
<header>
<h1>
🐄 Sistema de Animais da Fazenda
</h1>
<nav>
<a
href=
"/"
>
Lista
</a>
<a
href=
"/cadastro"
>
Cadastrar
</a>
</nav>
<hr>
</header>
<main>
{% block content %}
{% endblock %}
</main>
</body>
</body>
</html>
</html>
\ No newline at end of file
templates/cadastro.html
View file @
9dcf271a
...
@@ -2,11 +2,17 @@
...
@@ -2,11 +2,17 @@
{% block content %}
{% block content %}
<h2>
Cadastrar Animal
</h2>
<h2>
Cadastrar Animal
</h2>
<form>
<input
type=
"text"
placeholder=
"Nome"
required
>
<form
action=
"/cadastrar"
method=
"POST"
>
<input
type=
"text"
placeholder=
"Espécie"
required
>
<input
type=
"text"
name=
"nome"
placeholder=
"Nome"
required
><br><br>
<input
type=
"number"
placeholder=
"Idade"
required
>
<input
type=
"number"
placeholder=
"Peso"
required
>
<input
type=
"text"
name=
"especie"
placeholder=
"Espécie"
required
><br><br>
<input
type=
"number"
name=
"idade"
placeholder=
"Idade"
required
><br><br>
<input
type=
"number"
name=
"peso"
placeholder=
"Peso"
step=
"0.1"
required
><br><br>
<button
type=
"submit"
>
Cadastrar
</button>
<button
type=
"submit"
>
Cadastrar
</button>
</form>
</form>
{% endblock %}
{% endblock %}
\ No newline at end of file
templates/editar.html
View file @
9dcf271a
{% extends 'base.html' %}
{% block content %}
<h2>
Editar Animal
</h2>
<form
action=
"/atualizar/{{ animal.id }}"
method=
"POST"
>
<input
type=
"text"
name=
"nome"
value=
"{{ animal.nome }}"
required
><br><br>
<input
type=
"text"
name=
"especie"
value=
"{{ animal.especie }}"
required
><br><br>
<input
type=
"number"
name=
"idade"
value=
"{{ animal.idade }}"
required
><br><br>
<input
type=
"number"
name=
"peso"
value=
"{{ animal.peso }}"
step=
"0.1"
required
><br><br>
<button
type=
"submit"
>
Atualizar
</button>
</form>
{% endblock %}
\ No newline at end of file
templates/lista.html
View file @
9dcf271a
{% extends 'base.html' %}
{% block content %}
<h2>
Lista de Animais
</h2>
<table
border=
"1"
>
<tr>
<th>
ID
</th>
<th>
Nome
</th>
<th>
Espécie
</th>
<th>
Idade
</th>
<th>
Peso
</th>
<th>
Ações
</th>
</tr>
{% for animal in animais %}
<tr>
<td>
{{ animal.id }}
</td>
<td>
{{ animal.nome }}
</td>
<td>
{{ animal.especie }}
</td>
<td>
{{ animal.idade }}
</td>
<td>
{{ animal.peso }}
</td>
<td>
<a
href=
"/editar/{{ animal.id }}"
>
Editar
</a>
|
<a
href=
"/deletar/{{ animal.id }}"
>
Excluir
</a>
</td>
</tr>
{% endfor %}
</table>
{% endblock %}
\ 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