Browse Source

Arreglo campo año y visualización de albumes

politica
Celestino Rey 1 year ago
parent
commit
0cd7f26fac
5 changed files with 6 additions and 9 deletions
  1. +1
    -1
      ReyMotaAppsDj/K8S/Makefile
  2. +1
    -1
      ReyMotaAppsDj/K8S/Makefile.local
  3. +1
    -4
      ReyMotaAppsDj/reymota/lyrics/forms.py
  4. +1
    -1
      ReyMotaAppsDj/reymota/lyrics/models.py
  5. +2
    -2
      ReyMotaAppsDj/reymota/templates/lyrics/detalle_album.html

+ 1
- 1
ReyMotaAppsDj/K8S/Makefile View File

@ -1,7 +1,7 @@
export ARQUITECTURA := $(shell lscpu |grep itectur | tr -d ' '| cut -f2 -d':')
#export REGISTRY=registry.cube.local
export REGISTRY=registry.reymota.es
export IMG_VERSION = 0.19
export IMG_VERSION = 0.20
export IMG_NGINX_VERSION = 1.0
# limpia todo


+ 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.51
export IMG_VERSION = 0.54
export IMG_NGINX_VERSION = 1.0
# limpia todo


+ 1
- 4
ReyMotaAppsDj/reymota/lyrics/forms.py View File

@ -30,10 +30,7 @@ class AlbumForm(forms.ModelForm):
class SongForm(forms.ModelForm):
class Meta:
model = Song
fields = ['title', 'artist', 'album', 'year', 'lyrics']
year = forms.DateField(
widget=forms.DateInput(attrs={'type': 'date', 'class': 'form-control'}))
fields = ['title', 'artist', 'album', 'year', 'pista', 'lyrics']
artist = forms.ModelChoiceField(
queryset=Artista.objects.all(),


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

@ -34,7 +34,7 @@ class Song(models.Model):
title = models.CharField(max_length=200)
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])
year = models.DecimalField(max_digits=4, decimal_places=0, blank=False, null=False)
lyrics = models.TextField()
pista = models.DecimalField(max_digits=5, decimal_places=0, blank=True, null=True)


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

@ -25,7 +25,7 @@
<ul class="notification-meta list-inline mb-0">
<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"><a href="{% url 'lyrics:detalle_album' album_id=album.id %}">{{ album.name }}</a></li>
<li class="list-inline-item">|</li>
<li class="list-inline-item">{{ album.artist }}</li>
<li class="list-inline-item">|</li>
@ -52,7 +52,7 @@
<tr>
<td class="cell">{{ song.pista }}</td>
<td class="cell"><a href="{% url 'lyrics:detalle_song' song_id=song.id %}">{{ song.title }}</a></td>
<td class="cell">{{ song.author }}</td>
<td class="cell">{{ song.artist }}</td>
</tr>
{% endfor %}
</tbody>


Loading…
Cancel
Save