From caf7886567c4c055867762f9ab18e4dab67f8e50 Mon Sep 17 00:00:00 2001 From: Damillora Date: Sat, 10 Jul 2021 01:48:51 +0700 Subject: [PATCH] Add idol layout to frontend --- idols/models.py | 5 ++++- idols/templates/idols/show.html | 20 ++++++++++++++++++++ templates/layouts/base.html | 3 +++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/idols/models.py b/idols/models.py index 45044d5..d9bbfe3 100644 --- a/idols/models.py +++ b/idols/models.py @@ -26,5 +26,8 @@ class Idol(models.Model): objects = IdolManager() + class Meta: + ordering = [ 'romanized_name','name' ] + def __str__(self): - return self.romanized_name+" (CV: "+self.romanized_voice_actor_name+")" + return self.romanized_name+" "+"["+self.branch.acronym+"] "+" (CV: "+self.romanized_voice_actor_name+")" diff --git a/idols/templates/idols/show.html b/idols/templates/idols/show.html index 8b478f7..66c1574 100644 --- a/idols/templates/idols/show.html +++ b/idols/templates/idols/show.html @@ -27,6 +27,26 @@ {% endif %} + {% if idol.voice_actor_name %} + + + Voice Actor Name + + + {{ idol.voice_actor_name }} + + + {% endif %} + {% if idol.romanized_voice_actor_name %} + + + Romanized Voice Actor Name + + + {{ idol.romanized_voice_actor_name }} + + + {% endif %} {% endblock %} \ No newline at end of file diff --git a/templates/layouts/base.html b/templates/layouts/base.html index 4877843..8986f37 100644 --- a/templates/layouts/base.html +++ b/templates/layouts/base.html @@ -30,6 +30,9 @@ +