|
|
@ -24,11 +24,11 @@ def add_song(): |
|
|
pista = request.form['pista'] |
|
|
pista = request.form['pista'] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
new_song = Song(title=title, author=author, album_id=album_id, lyrics=lyrics) |
|
|
|
|
|
|
|
|
new_song = Song(title=title, author=author, album_id=album_id, lyrics=lyrics, pista=pista) |
|
|
db.session.add(new_song) |
|
|
db.session.add(new_song) |
|
|
db.session.commit() |
|
|
db.session.commit() |
|
|
|
|
|
|
|
|
return redirect(url_for('index')) |
|
|
|
|
|
|
|
|
return redirect(url_for('paginas.index')) |
|
|
|
|
|
|
|
|
albums = Album.query.all() |
|
|
albums = Album.query.all() |
|
|
return render_template('add_song.html', albums=albums) |
|
|
return render_template('add_song.html', albums=albums) |
|
|
@ -44,7 +44,7 @@ def add_album(): |
|
|
db.session.add(new_album) |
|
|
db.session.add(new_album) |
|
|
db.session.commit() |
|
|
db.session.commit() |
|
|
|
|
|
|
|
|
return redirect(url_for('index')) |
|
|
|
|
|
|
|
|
return redirect(url_for('paginas.index')) |
|
|
|
|
|
|
|
|
return render_template('add_album.html') |
|
|
return render_template('add_album.html') |
|
|
|
|
|
|
|
|
|