From: Guillaume Pellerin Date: Fri, 22 Apr 2016 10:06:09 +0000 (+0200) Subject: use featured for breaking news X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=11d7574d187f0ec1677dab0d77ada7358a13bafa;p=mezzo.git use featured for breaking news --- diff --git a/app/festival/templatetags/festival_tags.py b/app/festival/templatetags/festival_tags.py index 8b2d94ec..25e4ca56 100644 --- a/app/festival/templatetags/festival_tags.py +++ b/app/festival/templatetags/festival_tags.py @@ -28,3 +28,8 @@ def featured_events(*args): @register.as_tag def featured(*args): return Featured.objects.get(id=settings.HOME_FEATURED_ID) + + +@register.as_tag +def featured_breaking_news_content(*args): + return Featured.objects.get(id=settings.BREAKING_NEWS_FEATURED_ID).pages.all()[0].richtextpage.content diff --git a/app/local_settings.py b/app/local_settings.py index a9b40403..5f6713e2 100644 --- a/app/local_settings.py +++ b/app/local_settings.py @@ -109,3 +109,4 @@ TINYMCE_SETUP_JS = "/static/js/tinymce_setup.js" SLUGIFY = 'django.template.defaultfilters.slugify' HOME_FEATURED_ID = 1 +BREAKING_NEWS_FEATURED_ID = 4 diff --git a/app/locale/fr/LC_MESSAGES/django.mo b/app/locale/fr/LC_MESSAGES/django.mo index cc0c7bb7..4551d13e 100644 Binary files a/app/locale/fr/LC_MESSAGES/django.mo and b/app/locale/fr/LC_MESSAGES/django.mo differ diff --git a/app/locale/fr/LC_MESSAGES/django.po b/app/locale/fr/LC_MESSAGES/django.po index 2fb0f1b0..95fbee21 100644 --- a/app/locale/fr/LC_MESSAGES/django.po +++ b/app/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-04-22 10:44+0200\n" +"POT-Creation-Date: 2016-04-22 12:05+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -377,7 +377,15 @@ msgstr "Événements récents" msgid "Archive" msgstr "" -#: templates/base.html:167 +#: templates/base.html:136 +msgid "Dernière" +msgstr "Breaking" + +#: templates/base.html:136 +msgid "minute" +msgstr "news" + +#: templates/base.html:165 msgid "Playlist" msgstr "Playlist" @@ -386,6 +394,7 @@ msgid "published on" msgstr "publié le" #: templates/blog/blog_post_detail.html:119 +#: templates/pages/richtextpage.html:27 msgid "Related posts" msgstr "Articles associés" @@ -690,7 +699,7 @@ msgstr "Soumettre" msgid "Add" msgstr "" -#: templates/pages/richtextpage.html:14 +#: templates/pages/richtextpage.html:17 msgid "Related events" msgstr "Événements associés" diff --git a/app/templates/base.html b/app/templates/base.html index d407d520..8b5b13f3 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -132,14 +132,12 @@
- Dernière
minute ! + {% trans "Dernière" %}
{% trans "minute" %} !
-

- Partagez, twittez, commentez, publiez vos photos…
- et réservez dès maintenant vos places ou abonnements pour bénéficier de tarifs privilégiés. -

+ {% featured_breaking_news_content as content %} + {{ content|safe }}