Browse Source

Mostrando letras correctamente

politica
Celestino Rey 1 year ago
parent
commit
06ba95560f
10 changed files with 45 additions and 1514 deletions
  1. +1
    -1
      ReyMotaAppsDj/K8S/Makefile.local
  2. +0
    -1333
      ReyMotaAppsDj/K8S/libros.sql
  3. +0
    -0
      ReyMotaAppsDj/K8S/lyrics.sql
  4. +0
    -140
      ReyMotaAppsDj/K8S/vehiculos.sql
  5. +1
    -1
      ReyMotaAppsDj/reymota/lyrics/models.py
  6. +1
    -1
      ReyMotaAppsDj/reymota/lyrics/views.py
  7. +12
    -1
      ReyMotaAppsDj/reymota/templates/lyrics/detalle_album.html
  8. +1
    -1
      ReyMotaAppsDj/reymota/templates/lyrics/detalle_artista.html
  9. +19
    -13
      ReyMotaAppsDj/reymota/templates/lyrics/detalle_song.html
  10. +10
    -23
      ReyMotaAppsDj/reymota/templates/lyrics/lista_songs.html

+ 1
- 1
ReyMotaAppsDj/K8S/Makefile.local View File

@ -2,7 +2,7 @@ export ARQUITECTURA := $(shell lscpu |grep itectur | tr -d ' '| cut -f2 -d':')
export REGISTRY=localhost:30500
#export REGISTRY=registry.reymota.es
export IMG_VERSION = 0.25
export IMG_VERSION = 0.43
export IMG_NGINX_VERSION = 1.0
# limpia todo


+ 0
- 1333
ReyMotaAppsDj/K8S/libros.sql
File diff suppressed because it is too large
View File


+ 0
- 0
ReyMotaAppsDj/K8S/lyrics.sql View File


+ 0
- 140
ReyMotaAppsDj/K8S/vehiculos.sql View File

@ -1,140 +0,0 @@
--
-- PostgreSQL database dump
--
-- Dumped from database version 15.8 (Debian 15.8-1.pgdg120+1)
-- Dumped by pg_dump version 15.8 (Debian 15.8-1.pgdg120+1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- Data for Name: repostajes_vehiculo; Type: TABLE DATA; Schema: public; Owner: creylopez
--
COPY public.repostajes_vehiculo (id, marca, modelo, matricula, foto) FROM stdin;
5 BMW 318d 1018KPD vehiculos/bmws3.png
4 Toyota Corolla 7630LYR vehiculos/corolla.png
\.
--
-- Name: repostajes_repostaje; Type: TABLE; Schema: public; Owner: creylopez
--
--
-- Data for Name: repostajes_repostaje; Type: TABLE DATA; Schema: public; Owner: creylopez
--
COPY public.repostajes_repostaje (id, fecha, kms, litros, descuento, importe, precioxlitro, kmsrecorridos, consumo, vehiculo_id) FROM stdin;
16 2021-12-14 52731 0.00 0.00 0.00 0.00 52731 0.00 5
17 2021-12-23 53162 52.80 0.00 67.32 1.28 431 12.25 5
18 2021-12-31 54122 49.99 0.00 63.74 1.28 960 5.21 5
19 2022-01-22 54946 49.14 0.00 62.65 1.27 824 5.96 5
20 2022-02-09 55908 49.24 0.00 65.24 1.32 962 5.12 5
21 2022-03-03 56909 48.61 0.00 67.03 1.38 1001 4.86 5
22 2022-03-18 57542 30.06 0.00 52.54 1.75 633 4.75 5
23 2022-04-10 58497 46.63 0.00 69.98 1.50 955 4.88 5
24 2022-05-12 59447 47.14 0.00 72.11 1.53 950 4.96 5
25 2022-05-19 60414 48.57 0.00 79.81 1.64 967 5.02 5
26 2022-06-09 61147 36.20 0.00 62.12 1.72 733 4.94 5
27 2022-06-25 62116 49.17 0.00 90.29 1.84 969 5.07 5
28 2022-09-14 66359 53.24 0.00 84.83 1.59 1174 4.53 5
29 2022-09-23 67107 37.26 0.00 55.48 1.49 748 4.98 5
30 2023-01-24 71790 43.04 2.12 70.54 1.59 871 4.94 5
31 2022-12-03 70061 46.38 2.04 68.13 1.42 903 5.14 5
32 2022-12-26 70919 44.58 1.85 61.68 1.34 858 5.20 5
33 2023-03-05 73711 47.85 0.00 71.20 1.49 948 5.05 5
34 2023-03-25 74749 49.84 0.00 72.17 1.45 1038 4.80 5
35 2023-02-19 72763 49.38 2.34 77.97 1.53 973 5.08 5
36 2023-05-06 76434 32.28 0.00 44.09 1.37 1685 1.92 5
37 2023-05-22 77366 45.04 0.00 58.46 1.30 932 4.83 5
38 2022-07-09 63129 47.03 0.00 79.38 1.69 1013 4.64 5
39 2022-08-12 64088 43.73 0.00 65.55 1.50 959 4.56 5
40 2022-08-22 65185 52.78 0.00 78.80 1.49 1097 4.81 5
41 2022-10-12 68204 52.04 2.51 83.73 1.56 1097 4.74 5
42 2022-11-11 69158 45.28 2.37 78.91 1.69 954 4.75 5
43 2023-06-10 78170 41.09 0.00 54.16 1.32 804 5.11 5
44 2023-06-19 79038 40.78 1.95 60.11 1.43 868 4.70 5
45 2022-06-28 219 9.88 0.00 18.96 1.92 219 4.51 4
46 2022-06-28 236 27.36 0.00 51.33 1.88 17 160.94 4
47 2022-07-14 904 32.24 0.00 55.58 1.72 668 4.83 4
48 2022-07-26 1433 30.49 0.00 48.43 1.59 529 5.76 4
49 2022-08-21 2030 32.92 0.00 46.72 1.42 597 5.51 4
50 2022-09-26 2627 23.92 0.00 33.16 1.39 597 4.01 4
51 2022-10-18 3169 22.97 0.00 32.74 1.43 542 4.24 4
52 2022-11-09 3791 29.60 0.00 41.88 1.41 622 4.76 4
53 2022-11-27 4363 28.80 1.20 38.80 1.35 572 5.03 4
54 2022-12-22 4851 26.74 1.06 34.18 1.28 488 5.48 4
55 2023-01-12 5291 23.52 1.09 35.34 1.50 440 5.35 4
56 2023-02-01 5702 27.36 1.28 41.52 1.52 411 6.66 4
57 2023-02-20 6141 24.09 1.13 36.67 1.52 439 5.49 4
58 2023-03-15 6631 25.52 1.21 38.96 1.53 490 5.21 4
59 2023-04-17 7325 29.40 1.47 47.62 1.62 694 4.24 4
60 2023-05-28 8413 24.16 1.17 37.70 1.56 1088 2.22 4
61 2023-06-25 8956 26.38 1.30 41.94 1.59 543 4.86 4
62 2023-07-10 9471 29.04 1.35 43.49 1.50 515 5.64 4
63 2023-07-14 79875 40.56 1.74 56.26 1.41 837 4.85 5
64 2023-07-22 80806 46.29 1.95 63.05 1.37 931 4.97 5
65 2023-07-25 10043 24.85 1.40 40.32 1.62 572 4.34 4
66 2023-08-07 81695 44.39 0.00 63.88 1.44 889 4.99 5
67 2023-08-09 10582 26.49 1.39 44.94 1.70 539 4.91 4
68 2023-08-23 11050 24.05 1.22 39.40 1.64 468 5.14 4
69 2023-08-27 82715 50.40 0.00 77.06 1.53 1020 4.94 5
70 2023-09-14 11508 21.44 1.14 37.00 1.73 458 4.68 4
71 2023-09-19 83709 48.35 0.00 77.26 1.60 994 4.86 5
72 2023-09-27 84171 23.01 0.00 35.85 1.56 462 4.98 5
73 2023-10-10 85104 48.00 0.00 72.43 1.51 933 5.14 5
74 2023-10-15 12006 25.09 1.25 40.37 1.61 498 5.04 4
75 2023-10-27 86021 46.77 0.00 70.11 1.50 917 5.10 5
76 2023-11-04 12427 25.64 1.17 37.78 1.47 421 6.09 4
77 2023-11-11 86757 39.58 1.71 55.33 1.40 736 5.38 5
78 2023-11-20 12933 26.16 0.00 40.00 1.53 506 5.17 4
79 2023-11-23 87503 42.41 1.75 56.45 1.33 746 5.68 5
80 2023-12-04 88256 41.19 0.00 57.62 1.40 753 5.47 5
81 2023-12-17 88964 41.20 1.66 53.78 1.31 708 5.82 5
82 2024-01-06 13414 30.72 1.34 43.36 1.41 481 6.39 4
83 2024-01-07 89802 47.77 1.91 61.75 1.29 838 5.70 5
84 2024-01-22 13903 25.08 0.00 37.09 1.48 489 5.13 4
85 2024-01-27 90723 45.25 0.00 60.37 1.33 921 4.91 5
86 2024-02-11 14365 28.45 0.00 41.37 1.45 462 6.16 4
87 2024-02-12 91672 48.31 0.00 70.00 1.45 949 5.09 5
88 2024-02-27 92489 41.99 0.00 57.91 1.38 817 5.14 5
89 2024-02-29 14857 23.96 1.12 36.35 1.52 492 4.87 4
90 2024-03-18 15287 13.00 0.00 20.00 1.54 430 3.02 4
91 2024-03-19 93327 43.85 0.00 60.25 1.37 838 5.23 5
92 2024-03-25 15537 19.24 0.00 30.00 1.56 250 7.70 4
93 2024-04-06 15935 29.39 0.00 43.47 1.48 398 7.38 4
94 2024-04-08 94167 41.11 0.00 56.49 1.37 840 4.89 5
95 2024-04-22 16465 25.92 0.00 40.66 1.57 530 4.89 4
96 2024-04-29 95042 43.63 0.00 63.03 1.45 875 4.99 5
97 2024-05-13 16963 26.80 0.00 41.51 1.55 498 5.38 4
98 2024-05-21 96585 28.33 0.00 39.63 1.40 572 4.95 5
99 2024-05-27 97597 49.48 0.00 67.96 1.37 1012 4.89 5
100 2024-05-06 96013 50.59 0.00 73.32 1.45 971 5.21 5
101 2024-06-03 98067 23.97 0.00 32.69 1.36 470 5.10 5
102 2024-06-08 98609 28.28 1.25 40.44 1.43 542 5.22 5
103 2024-06-10 17494 26.72 0.00 39.92 1.49 531 5.03 4
104 2024-06-17 99166 26.91 0.00 36.43 1.35 557 4.83 5
105 2024-06-26 17879 18.91 0.00 28.44 1.50 385 4.91 4
106 2024-06-30 100048 44.39 0.00 61.57 1.39 882 5.03 5
107 2024-07-10 18397 25.42 0.00 38.49 1.51 518 4.91 4
108 2024-07-21 18944 27.71 0.00 40.29 1.45 547 5.07 4
109 2024-07-23 101010 45.25 0.00 60.52 1.34 962 4.70 5
110 2024-08-09 19596 32.19 0.00 43.58 1.35 652 4.94 4
111 2024-08-12 101710 30.69 0.00 39.10 1.27 700 4.38 5
112 2024-08-25 20185 29.08 0.00 38.07 1.31 589 4.94 4
1 2024-08-31 102649 45.27 0.00 55.64 1.23 939 4.82 5
2 2024-09-15 20775 29.51 0.00 39.51 1.34 590 5.00 4
\.

+ 1
- 1
ReyMotaAppsDj/reymota/lyrics/models.py View File

@ -35,7 +35,7 @@ class Song(models.Model):
artist = models.ForeignKey(Artista, on_delete=models.CASCADE)
album = models.ForeignKey(Album, on_delete=models.CASCADE)
year = models.PositiveBigIntegerField(default=current_year(), validators=[MinValueValidator(1984), max_value_current_year])
lyrics = models.CharField(max_length=1000)
lyrics = models.TextField()
pista = models.DecimalField(max_digits=5, decimal_places=0, blank=True, null=True)
def __str__(self):


+ 1
- 1
ReyMotaAppsDj/reymota/lyrics/views.py View File

@ -26,7 +26,7 @@ def lista_artistas(request):
def detalle_artista(request, artista_id):
artista = get_object_or_404(Artista, pk=artista_id)
albumes = Album.objects.filter(artista=artista_id)
albumes = Album.objects.filter(artist=artista_id)
return render(request, 'lyrics/detalle_artista.html', {'artista': artista, 'albumes': albumes})


+ 12
- 1
ReyMotaAppsDj/reymota/templates/lyrics/detalle_album.html View File

@ -12,15 +12,26 @@
<div class="app-card-header px-4 py-3">
<div class="row g-3 align-items-center">
<div class="col-12 col-lg-auto text-center text-lg-start">
{% if album %}
<div class="col-12 col-lg-auto text-center text-lg-start">
{% if album.cover_image %}
<p><img src="{{ album.cover_image.url }}" alt="{{ album.name }}" style="width:200px;height:200px;"></p>
{% else %}
<p>No hay imágen disponible</p>
{% endif %}
</div><!--//col-->
<h4 class="notification-title mb-1">{{ album.name }}</h4>
<ul class="notification-meta list-inline mb-0">
<li class="list-inline-item"><a href="{% url 'lyrics:detalle_album' album.album_id %}">{{ album.album.name }}</a></li>
<li class="list-inline-item"><a href="{% url 'lyrics:detalle_album' album_id=album.id %}">{{ album.album.name }}</a></li>
<li class="list-inline-item">|</li>
<li class="list-inline-item">{{ album.artist }}</li>
<li class="list-inline-item">|</li>
<li class="list-inline-item">{{ album.year }}</li>
</ul>
{% endif %}
</div><!--//col-->
</tr>
</div><!--//row-->


+ 1
- 1
ReyMotaAppsDj/reymota/templates/lyrics/detalle_artista.html View File

@ -41,7 +41,7 @@
<tbody>
{% for album in albumes %}
<tr>
<td class="cell"><a href="{% url 'lyrics:detalle_album' album.id %}">{{ album.name }}</a></td>
<td class="cell"><a href="{% url 'lyrics:detalle_album' album_id=album.id %}">{{ album.name }}</a></td>
<td class="cell">{{ album.artist }}</td>
<td class="cell">{{ album.year }}</td>
</tr>


+ 19
- 13
ReyMotaAppsDj/reymota/templates/lyrics/detalle_song.html View File

@ -9,29 +9,35 @@
{% block content %}
<div class="container-xl">
<div class="app-card app-card-notification shadow-sm mb-4">
{% for album in albumes %}
<div class="app-card-header px-4 py-3">
<div class="row g-3 align-items-center">
<div class="col-12 col-lg-auto text-center text-lg-start">
{% if album.cover_image %}
<p><img src="{{ album.cover_image.url }}" alt="{{ album.name }}" style="width:200px;height:200px;"></p>
{% else %}
<p>No hay imágen disponible</p>
{% endif %}
</div><!--//col-->
<div class="col-12 col-lg-auto text-center text-lg-start">
<h4 class="notification-title mb-1">{{ repostaje.fecha }}</h4>
<h4 class="notification-title mb-1">{{ song.name }}</h4>
<ul class="notification-meta list-inline mb-0">
<li class="list-inline-item"><a href="{% url 'repostajes:detalle_vehiculo' repostaje.vehiculo_id %}">{{ repostaje.vehiculo.matricula }}</a></li>
<li class="list-inline-item">|</li>
<li class="list-inline-item">{{ repostaje.kms }} kms</li>
<li class="list-inline-item">|</li>
<li class="list-inline-item">{{ repostaje.litros }} litros</li>
<li class="list-inline-item">|</li>
<li class="list-inline-item">{{ repostaje.importe }} €</li>
<li class="list-inline-item">|</li>
<li class="list-inline-item">{{ repostaje.kmsrecorridos }} kms. recorridos</li>
<li class="list-inline-item">{{ song.artist }}</li>
<li class="list-inline-item">|</li>
<li class="list-inline-item">{{ repostaje.consumo }} litros/100 kms</li>
<li class="list-inline-item">{{ song.year }}</li>
<li class="list-inline-item">|</li>
<li class="list-inline-item">{{ repostaje.precioxlitro }} €/litros</li>
<li class="list-inline-item"><a href="{% url 'lyrics:detalle_album' album_id=album.id %}">{{ song.album.name }}</a></li>
</ul>
</div><!--//col-->
</tr>
</div><!--//row-->
</div><!--//app-card-header-->
<div class="app-card-body p-4">
<pre>{{ song.lyrics }}</pre>
</div><!--//app-card-body-->
{% endfor %}
</div><!--//app-card-->
{% endblock %}

+ 10
- 23
ReyMotaAppsDj/reymota/templates/lyrics/lista_songs.html View File

@ -17,7 +17,7 @@
<div class="page-utilities">
<div class="row g-4 justify-content-start justify-content-md-end align-items-center">
<div class="col-auto">
<a class="btn app-btn-primary" href="{% url 'repostajes:nuevo_repostaje' %}">Añadir repostaje</a>
<a class="btn app-btn-primary" href="{% url 'lyrics:nuevo_song' %}">Añadir canción</a>
</div>
</div><!--//row-->
</div><!--//table-utilities-->
@ -29,33 +29,20 @@
<table class="table app-table-hover mb-0 text-left">
<thead>
<tr>
<th class="cell">Fecha</th>
<th class="cell">Vehículo</th>
<th class="cell">Kilómetros</th>
<th class="cell">Litros</th>
<th class="cell">Importe</th>
<th class="cell">Descuento</th>
<th class="cell">Precio por litro</th>
<th class="cell">Kms recorridos</th>
<th class="cell">Consumo/100 kms</th>
<th class="cell">Título</th>
<th class="cell">Autor</th>
<th class="cell">Álbum</th>
</tr>
</thead>
{% for repostaje in repostajes %}
<tbody>
{% for song in songs %}
<tr>
<td class="cell"><a href="{% url 'repostajes:detalle_repostaje' repostaje.id %}">{{ repostaje.fecha }}</a></td>
<td class="cell"><a href="{% url 'repostajes:detalle_vehiculo' repostaje.vehiculo.id %}">{{ repostaje.vehiculo.matricula }}</a></td>
<td class="cell">{{ repostaje.kms }}</td>
<td class="cell">{{ repostaje.litros }}</td>
<td class="cell">{{ repostaje.importe }} €</td>
<td class="cell">{{ repostaje.descuento }} €</td>
<td class="cell">{{ repostaje.precioxlitro }} €</td>
<td class="cell">{{ repostaje.kmsrecorridos }}</td>
<td class="cell">{{ repostaje.consumo }}</td>
<td class="cell"><a href="{% url 'lyrics:detalle_song' song_id=song.id %}">{{ song.title }}</a></td>
<td class="cell">{{ song.artist }}</td>
<td class="cell"><a href="{% url 'lyrics:detalle_album' album_id=song.album.id %}">{{ song.album.name }}</a></td>
</tr>
</tbody>
{% endfor %}
{% endfor %}
</tbody>
</table>
</div>
</div><!--//container-fluid-->


Loading…
Cancel
Save