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
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
Rafaela Ramos
CRUD_Animais_da_Fazenda
Commits
30edf5cc
Commit
30edf5cc
authored
Apr 16, 2026
by
Marina
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'main' of
http://gitlab.ariquemes.ifro.edu.br/2024105070034/CRUD_Animais_da_Fazenda
parents
fb02f93f
bea57c13
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
animais.html
templates/animais.html
+13
-0
listar.html
templates/listar.html
+4
-0
No files found.
templates/animais.html
0 → 100644
View file @
30edf5cc
@app.route('/add', methods=['POST'])
def add():
nome = request.form['nome']
especie = request.form['especie']
idade = request.form['idade']
peso = request.form['peso']
novo = Animal(nome=nome, especie=especie, idade=idade, peso=peso)
db.session.add(novo)
db.session.commit()
return redirect('/')
\ No newline at end of file
templates/listar.html
0 → 100644
View file @
30edf5cc
@app.route('/')
def index():
animais = Animal.query.all()
return render_template('index.html', animais=animais)
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