From 0e67ca55848b8e1d0b57f33d5f0f721433cacd00 Mon Sep 17 00:00:00 2001 From: Celestino Rey Date: Thu, 20 Jun 2024 16:49:35 +0200 Subject: [PATCH] =?UTF-8?q?La=20lista=20de=20albumes=20ahora=20tiene=20enl?= =?UTF-8?q?aces=20para=20ver=20informaci=C3=B3n=20del=20=C3=A1lbum?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LyricsPy/app.py | 6 ++++++ LyricsPy/instance/songs.db | Bin 20480 -> 20480 bytes LyricsPy/templates/album.html | 18 ++++++++++++++++++ LyricsPy/templates/index.html | 4 +++- 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 LyricsPy/templates/album.html diff --git a/LyricsPy/app.py b/LyricsPy/app.py index 53f3c38..4f9cc9f 100644 --- a/LyricsPy/app.py +++ b/LyricsPy/app.py @@ -55,6 +55,12 @@ def add_album(): return render_template('add_album.html') +@app.route('/album/') +def album(album_id): + album = Album.query.get_or_404(album_id) + songs = Song.query.filter_by(album_id=album_id).all() + return render_template('album.html', album=album, songs=songs) + if __name__ == '__main__': with app.app_context(): db.create_all() diff --git a/LyricsPy/instance/songs.db b/LyricsPy/instance/songs.db index 7c59f1f647057b1989cfa0d7c080fa8ed265f537..10862792a8a5dbc7d3f42c8a68050f69cdf4bcce 100644 GIT binary patch delta 1457 zcmZ`(J#W-N5Y0gmICQ@NiXly!i;$405xF9|f)6Q3X<6HAd+~b5*^ih*LQYKu1w93S z08vm;@yB>$Urq>;#`4aN-^_b&#+P4bmtSX}?$7o=KUmH7zrXqR^v@4fxi?DzNc zpR?iPhuiym4Rc2xs-bj0R^%R$wwaX#azJF)GOQIhLI>~EQj2unAeN> zAgnxFiNsLzeJEzr1uCABtd0C%2`@HSAdy{4e0e^=1}4drEQT0sMt(ddldp@=Gyioj-1 zrSY(+#SuOWDR3^_VU(6FWl$p^8WNz#D+*i8F5#k}GMjW* z%+I!pR$BS7#Sl}Lv3KHKh_HE!nt7Nw`XvhcWOZ1IkE%p1Si-h|1u!t=HM3pJU+4?% zfr7EF)P)!<{zi%elfA;d$vEZPYn;2rxD{hGcFtjl;KI$$ow09dfY+JI8*BV`gQ|d?6cBix|l8SRsuO z6qcbEh1X+yj21%wpektZ`POBBZHIfvHd)Jy|jChQDCF$r_8gSd#F z#Zp`-HKq(5Wae_1>+e8^>Mz)O!OYGSg*_|2Koi`R*vTt^F-^&32v{{ album.name }} +

Artist: {{ album.artist }}

+

Year: {{ album.year }}

+ +

Songs in this Album

+ + +Back to Home +{% endblock %} diff --git a/LyricsPy/templates/index.html b/LyricsPy/templates/index.html index 8834a14..1dac9b7 100644 --- a/LyricsPy/templates/index.html +++ b/LyricsPy/templates/index.html @@ -21,7 +21,9 @@

Albums