diff --git a/artists/templates/artists/show.html b/artists/templates/artists/show.html index 46277b0..1f47e02 100644 --- a/artists/templates/artists/show.html +++ b/artists/templates/artists/show.html @@ -33,7 +33,7 @@ Alias - {{ alias.romanized_name }} + {{ alias.romanized_name }} {% endfor %} diff --git a/artists/views.py b/artists/views.py index 6793177..aa55d7e 100644 --- a/artists/views.py +++ b/artists/views.py @@ -10,6 +10,12 @@ def artist_index(request): def artist_show(request, slug): artist = Artist.objects.filter(slug=slug)[0] - credit_songs = (artist.written_songs.all() | artist.composed_songs.all() | artist.arranged_songs.all()).distinct() + credit_songs = artist.written_songs.all() | artist.composed_songs.all() | artist.arranged_songs.all() + aliases = artist.aliases.all() outside_songs = OutsideSong.objects.filter(composer=artist) + for alias in aliases: + credit_songs = credit_songs | alias.written_songs.all() | artist.composed_songs.all() | artist.arranged_songs.all() + outside_songs = outside_songs | OutsideSong.objects.filter(composer=alias) + credit_songs = credit_songs.distinct() + outside_songs = outside_songs.distinct() return render(request,'artists/show.html',{'artist': artist,'credit_songs':credit_songs,'outside_songs':outside_songs}) \ No newline at end of file diff --git a/categories/templates/branches/index.html b/categories/templates/branches/index.html index 92a099f..8e9e342 100644 --- a/categories/templates/branches/index.html +++ b/categories/templates/branches/index.html @@ -3,24 +3,18 @@ {% block title %}Branches{% endblock %} {% block content %}

Branches

- - - - - - - - {% for branch in branches %} - - - - - - {% endfor %} - -
AcronymLogoName
{{ branch.acronym }} - {% if branch.logo %} - - {% endif %} - {{ branch.name }} [{{ branch.acronym }}]
+ {% for branch in branches %} +
+
+ {% if branch.logo %} + + {% endif %} +
+
+ +
+
+ {% endfor %} {% endblock %} \ No newline at end of file diff --git a/songs/templates/songs/show.html b/songs/templates/songs/show.html index 5b2b68c..2d02a4b 100644 --- a/songs/templates/songs/show.html +++ b/songs/templates/songs/show.html @@ -8,7 +8,7 @@ {% if song.branch %} - + diff --git a/templates/components/song-table.html b/templates/components/song-table.html index 6414052..b3355b9 100644 --- a/templates/components/song-table.html +++ b/templates/components/song-table.html @@ -8,15 +8,9 @@ {% for song in songs %} - +
Branch [{{ song.branch.acronym }}] {{ song.branch.name }}
- {% if song.branch.logo %} - - - - {% else %} {{ song.branch.acronym }} - {% endif %} {{ song.title }} diff --git a/templates/layouts/base.html b/templates/layouts/base.html index 65c5a07..4877843 100644 --- a/templates/layouts/base.html +++ b/templates/layouts/base.html @@ -1,3 +1,5 @@ +{% load static %} + @@ -9,6 +11,7 @@ +