From 1e6792b424b45777a03ee4222069e5369e5c83f4 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Mon, 29 Feb 2016 11:16:18 +0100 Subject: [PATCH] fix slug, add css main and main-panel classes --- app/festival/models.py | 13 +++++++------ app/festival/static/festival/css/festival.css | 8 ++++++++ app/festival/templates/festival/artist_detail.html | 3 +-- app/templates/base.html | 4 ++-- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/app/festival/models.py b/app/festival/models.py index ad419e43..dbe9ea66 100644 --- a/app/festival/models.py +++ b/app/festival/models.py @@ -82,10 +82,12 @@ class Artist(Displayable, RichText, AdminThumbMixin): def __unicode__(self): return self.title + @property + def name(self): + return self.title + def get_absolute_url(self): - url_name = "festival_artist_detail" - kwargs = {"slug": self.slug} - return reverse(url_name, kwargs=kwargs) + return reverse("festival-artist-detail", kwargs={'slug': self.slug}) class Video(Displayable, RichText): @@ -103,13 +105,12 @@ class Video(Displayable, RichText): @property def html(self): + #TODO: get html content from medias.ircam.fr with request module pass @models.permalink def get_absolute_url(self): - url_name = "festival_video_detail" - kwargs = {"slug": self.slug} - return reverse(url_name, kwargs=kwargs) + return reverse("festival-video-detail", kwargs={"slug": self.slug}) class EventCategory(BaseNameModel): diff --git a/app/festival/static/festival/css/festival.css b/app/festival/static/festival/css/festival.css index e69de29b..0e1179d9 100644 --- a/app/festival/static/festival/css/festival.css +++ b/app/festival/static/festival/css/festival.css @@ -0,0 +1,8 @@ + +.main { + margin-top: 5em; +} + +.main-panel { + margin-top: 5em; +} diff --git a/app/festival/templates/festival/artist_detail.html b/app/festival/templates/festival/artist_detail.html index aabab7fb..bce6fa68 100644 --- a/app/festival/templates/festival/artist_detail.html +++ b/app/festival/templates/festival/artist_detail.html @@ -12,12 +12,11 @@ {{ artist.bio|safe }} -

{% trans 'Events' %}

{% for event in artist.events.all %} {{ event.title }} + {% endfor %}
-{% endfor %} {% endblock %} diff --git a/app/templates/base.html b/app/templates/base.html index d0e48973..b222d24f 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -95,11 +95,11 @@
-
+
{% block main %}{% endblock %}
-
+
{% nevercache %} {% include "includes/language_selector.html" %} {% include "includes/user_panel.html" %} -- 2.39.5