From: Guillaume Pellerin Date: Tue, 21 Jun 2016 21:32:56 +0000 (+0200) Subject: mv templates, add project app, add top header placeholer X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=60e2fdd2c7170db5e2e52f92404a1a04348c1d39;p=mezzo.git mv templates, add project app, add top header placeholer --- diff --git a/app/festival/templates/festival/artist_detail.html b/app/festival/templates/festival/artist_detail.html deleted file mode 100644 index 5e1087c2..00000000 --- a/app/festival/templates/festival/artist_detail.html +++ /dev/null @@ -1,43 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load mezzanine_tags keyword_tags festival_tags %} - -{% block title %} -{{ artist.name }} -{% endblock %} - -{% block main %} -
-

- {% if artist.photo %} -

- - -
- {% endif %} - {{ artist.bio|safe }} -
-

-
- -
-{% if artist.events.all %} -

{% trans "Also discover" %}


-
-
- {% for event in artist.events.all|no_parents %} - {% include 'agenda/includes/event_card.html' %} - {% endfor %} - {% for video in artist.videos.all %} - {% include 'festival/inc/video_card.html' %} - {% endfor %} - {% with artist.events.all|unique_posts as posts %} - {% for post in posts %} - {% include 'blog/includes/post_card.html' %} - {% endfor %} - {% endwith %} -
-{% endif %} -{% endblock %} diff --git a/app/festival/templates/festival/artist_list.html b/app/festival/templates/festival/artist_list.html deleted file mode 100644 index ba6e6a63..00000000 --- a/app/festival/templates/festival/artist_list.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load mezzanine_tags keyword_tags %} - -{% block title %} - {% trans "Artists" %} -{% endblock %} - -{% block main %} -
-
- {% for artist in object_list %} - {% include "festival/inc/artist_card.html" %} - {% endfor %} -
-{% endblock %} diff --git a/app/festival/templates/festival/inc/artist_card.html b/app/festival/templates/festival/inc/artist_card.html deleted file mode 100644 index 21c3babe..00000000 --- a/app/festival/templates/festival/inc/artist_card.html +++ /dev/null @@ -1,16 +0,0 @@ -{% load i18n pages_tags mezzanine_tags %} - -
- -
diff --git a/app/festival/templates/festival/inc/audio_playlist.html b/app/festival/templates/festival/inc/audio_playlist.html deleted file mode 100644 index 83478730..00000000 --- a/app/festival/templates/festival/inc/audio_playlist.html +++ /dev/null @@ -1,26 +0,0 @@ -{% load staticfiles %} - -
- {% for audio in playlist.audios.all %} - {% if forloop.first %} -
- - - {{ audio.title }} - -
- - {% endif %} -
diff --git a/app/festival/templates/festival/inc/video_card.html b/app/festival/templates/festival/inc/video_card.html deleted file mode 100644 index 3d5bb2ed..00000000 --- a/app/festival/templates/festival/inc/video_card.html +++ /dev/null @@ -1,11 +0,0 @@ -{% load i18n %} - -
-
- -
-
-

{{ video.title }}

-
- {% trans "Play the video" %} -
diff --git a/app/festival/templates/festival/video_detail.html b/app/festival/templates/festival/video_detail.html deleted file mode 100644 index b954cc14..00000000 --- a/app/festival/templates/festival/video_detail.html +++ /dev/null @@ -1,52 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load mezzanine_tags keyword_tags %} - -{% block title %} -{{ video.title }} -{% endblock %} - -{% block main %} - -
- {{ video.content|safe }} -
- -
- -
- -{% with video as object %} - {% include "includes/share_buttons.html" %} -{% endwith %} - -{% if video.event %} -
-

{% trans 'Also discover' %}

-
-
- {% with video.event as event %} - {% include 'agenda/includes/event_card.html' %} - {% for artist in video.artists.all %} - {% include "festival/inc/artist_card.html" %} - {% endfor %} - {% for v in event.videos.all %} - {% if v != video %} - {% with v as video %} - {% include 'festival/inc/video_card.html' %} - {% endwith %} - {% endif %} - {% endfor %} - {% for post in event.blog_posts.all %} - {% include 'blog/includes/post_card.html' %} - {% endfor %} - {% endwith %} - -
-
-{% endif %} - -{% endblock %} diff --git a/app/festival/templates/festival/video_list.html b/app/festival/templates/festival/video_list.html deleted file mode 100644 index dcb45e66..00000000 --- a/app/festival/templates/festival/video_list.html +++ /dev/null @@ -1,30 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load mezzanine_tags keyword_tags festival_tags %} - -{% block title %} - {% trans "Videos" %} -{% endblock %} - -{% block main %} - -{% if categories %} - -
-{% endif %} - -
-
- {% for video in object_list %} - {% if video.status == 2 %} - {% include 'festival/inc/video_card.html' %} - {% endif %} - {% endfor %} -
-{% endblock %} diff --git a/app/project/__init__.py b/app/project/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/app/project/admin.py b/app/project/admin.py new file mode 100644 index 00000000..8c38f3f3 --- /dev/null +++ b/app/project/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/app/project/apps.py b/app/project/apps.py new file mode 100644 index 00000000..6b7b7998 --- /dev/null +++ b/app/project/apps.py @@ -0,0 +1,7 @@ +from __future__ import unicode_literals + +from django.apps import AppConfig + + +class ProjectConfig(AppConfig): + name = 'project' diff --git a/app/project/migrations/__init__.py b/app/project/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/app/project/models.py b/app/project/models.py new file mode 100644 index 00000000..bd4b2abe --- /dev/null +++ b/app/project/models.py @@ -0,0 +1,5 @@ +from __future__ import unicode_literals + +from django.db import models + +# Create your models here. diff --git a/app/project/tests.py b/app/project/tests.py new file mode 100644 index 00000000..7ce503c2 --- /dev/null +++ b/app/project/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/app/project/views.py b/app/project/views.py new file mode 100644 index 00000000..91ea44a2 --- /dev/null +++ b/app/project/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/app/settings.py b/app/settings.py index 3cc9822b..4460d6a8 100644 --- a/app/settings.py +++ b/app/settings.py @@ -42,9 +42,9 @@ from django.utils.translation import ugettext_lazy as _ # that doesn't appear in this setting, all pages will appear in it. PAGE_MENU_TEMPLATES = ( - (1, _("Top navigation bar"), "pages/menus/dropdown.html"), - # (2, _("Left-hand tree"), "pages/menus/tree.html"), - (2, _("Footer"), "pages/menus/footer.html"), + (1, _("Top header"), "pages/menus/header.html"), + (2, _("Top navigation bar"), "pages/menus/dropdown.html"), + (3, _("Footer"), "pages/menus/footer.html"), ) # A sequence of fields that will be injected into Mezzanine's (or any diff --git a/app/templates/templates/festival/artist_detail.html b/app/templates/templates/festival/artist_detail.html new file mode 100644 index 00000000..5e1087c2 --- /dev/null +++ b/app/templates/templates/festival/artist_detail.html @@ -0,0 +1,43 @@ +{% extends "base.html" %} +{% load i18n %} +{% load mezzanine_tags keyword_tags festival_tags %} + +{% block title %} +{{ artist.name }} +{% endblock %} + +{% block main %} +
+

+ {% if artist.photo %} +

+ + +
+ {% endif %} + {{ artist.bio|safe }} +
+

+
+ +
+{% if artist.events.all %} +

{% trans "Also discover" %}


+
+
+ {% for event in artist.events.all|no_parents %} + {% include 'agenda/includes/event_card.html' %} + {% endfor %} + {% for video in artist.videos.all %} + {% include 'festival/inc/video_card.html' %} + {% endfor %} + {% with artist.events.all|unique_posts as posts %} + {% for post in posts %} + {% include 'blog/includes/post_card.html' %} + {% endfor %} + {% endwith %} +
+{% endif %} +{% endblock %} diff --git a/app/templates/templates/festival/artist_list.html b/app/templates/templates/festival/artist_list.html new file mode 100644 index 00000000..ba6e6a63 --- /dev/null +++ b/app/templates/templates/festival/artist_list.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} +{% load i18n %} +{% load mezzanine_tags keyword_tags %} + +{% block title %} + {% trans "Artists" %} +{% endblock %} + +{% block main %} +
+
+ {% for artist in object_list %} + {% include "festival/inc/artist_card.html" %} + {% endfor %} +
+{% endblock %} diff --git a/app/templates/templates/festival/inc/artist_card.html b/app/templates/templates/festival/inc/artist_card.html new file mode 100644 index 00000000..21c3babe --- /dev/null +++ b/app/templates/templates/festival/inc/artist_card.html @@ -0,0 +1,16 @@ +{% load i18n pages_tags mezzanine_tags %} + +
+ +
diff --git a/app/templates/templates/festival/inc/audio_playlist.html b/app/templates/templates/festival/inc/audio_playlist.html new file mode 100644 index 00000000..83478730 --- /dev/null +++ b/app/templates/templates/festival/inc/audio_playlist.html @@ -0,0 +1,26 @@ +{% load staticfiles %} + +
+ {% for audio in playlist.audios.all %} + {% if forloop.first %} +
+ + + {{ audio.title }} + +
+ + {% endif %} +
diff --git a/app/templates/templates/festival/inc/video_card.html b/app/templates/templates/festival/inc/video_card.html new file mode 100644 index 00000000..3d5bb2ed --- /dev/null +++ b/app/templates/templates/festival/inc/video_card.html @@ -0,0 +1,11 @@ +{% load i18n %} + +
+
+ +
+
+

{{ video.title }}

+
+ {% trans "Play the video" %} +
diff --git a/app/templates/templates/festival/video_detail.html b/app/templates/templates/festival/video_detail.html new file mode 100644 index 00000000..b954cc14 --- /dev/null +++ b/app/templates/templates/festival/video_detail.html @@ -0,0 +1,52 @@ +{% extends "base.html" %} +{% load i18n %} +{% load mezzanine_tags keyword_tags %} + +{% block title %} +{{ video.title }} +{% endblock %} + +{% block main %} + +
+ {{ video.content|safe }} +
+ +
+ +
+ +{% with video as object %} + {% include "includes/share_buttons.html" %} +{% endwith %} + +{% if video.event %} +
+

{% trans 'Also discover' %}

+
+
+ {% with video.event as event %} + {% include 'agenda/includes/event_card.html' %} + {% for artist in video.artists.all %} + {% include "festival/inc/artist_card.html" %} + {% endfor %} + {% for v in event.videos.all %} + {% if v != video %} + {% with v as video %} + {% include 'festival/inc/video_card.html' %} + {% endwith %} + {% endif %} + {% endfor %} + {% for post in event.blog_posts.all %} + {% include 'blog/includes/post_card.html' %} + {% endfor %} + {% endwith %} + +
+
+{% endif %} + +{% endblock %} diff --git a/app/templates/templates/festival/video_list.html b/app/templates/templates/festival/video_list.html new file mode 100644 index 00000000..dcb45e66 --- /dev/null +++ b/app/templates/templates/festival/video_list.html @@ -0,0 +1,30 @@ +{% extends "base.html" %} +{% load i18n %} +{% load mezzanine_tags keyword_tags festival_tags %} + +{% block title %} + {% trans "Videos" %} +{% endblock %} + +{% block main %} + +{% if categories %} + +
+{% endif %} + +
+
+ {% for video in object_list %} + {% if video.status == 2 %} + {% include 'festival/inc/video_card.html' %} + {% endif %} + {% endfor %} +
+{% endblock %}