'shop.Sale',
)),
(_('Jobs'), ('organization-job.JobOffer','organization-job.Candidacy')),
- (_('Festival'), ('organization-festival.Artist',)),
(_('Users'), ('auth.User', 'auth.Group',)),
(_('Site'), ('sites.Site', 'redirects.Redirect', 'conf.Setting')),
)
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-11-17 15:57+0100\n"
+"POT-Creation-Date: 2016-11-18 12:52+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgstr "Offres d'emplois et stages"
#: local_settings.py:140
-msgid "Festival"
-msgstr ""
-
-#: local_settings.py:141
msgid "Users"
msgstr ""
-#: local_settings.py:142 templates/admin/login.html:59
+#: local_settings.py:141 templates/admin/login.html:59
msgid "Site"
msgstr ""
msgid "Everything"
msgstr "Tout"
-#: organization/festival/models.py:21 organization/job/models.py:11
-#: organization/network/models.py:228
+#: organization/job/models.py:11 organization/network/models.py:228
msgid "first name"
msgstr ""
-#: organization/festival/models.py:22 organization/job/models.py:12
-#: organization/network/models.py:229
+#: organization/job/models.py:12 organization/network/models.py:229
msgid "last name"
msgstr ""
-#: organization/festival/models.py:23 organization/network/models.py:233
-msgid "biography"
-msgstr "biographie"
-
-#: organization/festival/models.py:27
-msgid "artist"
-msgstr "artiste"
-
#: organization/job/models.py:13 organization/network/models.py:230
msgid "email"
msgstr ""
msgid "birthday"
msgstr "déte de naissance"
+#: organization/network/models.py:233
+msgid "biography"
+msgstr "biographie"
+
#: organization/network/models.py:234 organization/network/models.py:443
msgid "external ID"
msgstr ""
msgid "Locations"
msgstr "Lieux"
-#: templates/agenda/includes/event_date.html:27
-#: templates/agenda/includes/event_date.html:47
-#: templates/agenda/includes/event_date.html:50
-#: templates/agenda/includes/event_date.html:66
+#: templates/agenda/includes/event_date.html:28
+#: templates/agenda/includes/event_date.html:48
+#: templates/agenda/includes/event_date.html:51
+#: templates/agenda/includes/event_date.html:67
+#: templates/agenda/includes/event_date_slider.html:28
+#: templates/agenda/includes/event_date_slider.html:39
msgid "and"
msgstr "et"
-#: templates/agenda/includes/event_date.html:41
-#: templates/agenda/includes/event_date.html:64
-#: templates/agenda/includes/event_date.html:72
+#: templates/agenda/includes/event_date.html:42
+#: templates/agenda/includes/event_date.html:65
+#: templates/agenda/includes/event_date.html:73
+#: templates/agenda/includes/event_date_slider.html:37
+#: templates/agenda/includes/event_date_slider.html:44
msgid "through"
msgstr "au"
msgstr "Événements récents"
#: templates/agenda/includes/filter_panel.html:38
-#: templates/blog/includes/filter_panel.html:27
msgid "Archive"
msgstr "Archive"
#: templates/agenda/includes/filter_panel.html:74
-#: templates/blog/includes/filter_panel.html:56
msgid "Tags"
msgstr "Mots clés"
-#: templates/blog/includes/filter_panel.html:6
-msgid "Recent Posts"
-msgstr "Articles récents"
-
-#: templates/blog/includes/filter_panel.html:43
-msgid "Categories"
-msgstr "Catégories"
-
-#: templates/blog/includes/filter_panel.html:72
-#: templates/projects/project_demo_detail.html:36
-msgid "Authors"
-msgstr "Auteurs"
-
-#: templates/blog/includes/filter_panel.html:84
-msgid "Feeds"
-msgstr "Fils"
-
-#: templates/blog/includes/filter_panel.html:86
-#: templates/blog/includes/filter_panel.html:90
-#: templates/blog/includes/filter_panel.html:94
-#: templates/blog/includes/filter_panel.html:98
-msgid "RSS"
-msgstr ""
-
-#: templates/blog/includes/filter_panel.html:87
-#: templates/blog/includes/filter_panel.html:91
-#: templates/blog/includes/filter_panel.html:95
-#: templates/blog/includes/filter_panel.html:99
-msgid "Atom"
-msgstr ""
-
#: templates/core/inc/related_content.html:8
#: templates/core/inc/related_content_dynamic.html:8
-#: templates/festival/artist_detail.html:27
-#: templates/festival/video_detail.html:28
msgid "Also discover"
msgstr "À découvrir aussi"
msgid "Sorry, an error occurred."
msgstr "Une erreur s'est produite."
-#: templates/festival/artist_list.html:6
-msgid "Artists"
-msgstr "Artistes"
-
-#: templates/festival/inc/video_card.html:10
-msgid "Play the video"
-msgstr "Jouer la vidéo"
-
-#: templates/festival/video_list.html:6
-msgid "Videos"
-msgstr "Vidéos"
-
#: templates/generic/includes/comment.html:22
#: templates/generic/includes/comment.html:59 templates/twitter/tweets.html:19
#, python-format
msgid "News"
msgstr "Actualité"
-#: templates/includes/calendar.html:3
-msgid "Festival calendar"
-msgstr "Calendrier du festival"
-
#: templates/includes/editable_form.html:16
msgid "Save"
msgstr ""
msgid "Publish date"
msgstr "Date de publication"
-#: templates/magazine/article/article_list.html:4
-#: templates/magazine/article/article_list.html:22
-#: templates/magazine/topic/topic_detail.html:24
-msgid "Articles"
-msgstr "Articles"
-
-#: templates/magazine/article/article_list.html:31
-msgid "Tag:"
-msgstr "Mot clé :"
-
-#: templates/magazine/article/article_list.html:33
-msgid "Category:"
-msgstr "Catégorie :"
-
-#: templates/magazine/article/article_list.html:37
-msgid "Author:"
-msgstr "Auteur :"
-
#: templates/magazine/brief/inc/brief_card.html:6
msgid "Brief !"
msgstr "Brève !"
+#: templates/magazine/topic/topic_detail.html:24
+msgid "Articles"
+msgstr "Articles"
+
#: templates/media/audio/inc/audio_search.html:20
#: templates/media/inc/playlist_search.html:49
#: templates/media/video/inc/video_search.html:20
msgid "Project"
msgstr "Projet"
-#: templates/pages/richtextpage.html:17
-msgid "Related events"
-msgstr "Événements associés"
-
-#: templates/pages/richtextpage.html:27
-msgid "Related posts"
-msgstr "Articles associés"
-
#: templates/pages/teampage.html:86
msgid "Research topics and related projects"
msgstr "Domaines de recherche et projets associés"
msgid "Demos"
msgstr "Demos"
+#: templates/projects/project_demo_detail.html:36
+msgid "Authors"
+msgstr "Auteurs"
+
#: templates/projects/project_detail.html:124
msgid "Project details"
msgstr "Détails du projet"
msgid "Recent Tweets"
msgstr "Tweets récents"
+#~ msgid "artist"
+#~ msgstr "artiste"
+
+#~ msgid "Recent Posts"
+#~ msgstr "Articles récents"
+
+#~ msgid "Categories"
+#~ msgstr "Catégories"
+
+#~ msgid "Feeds"
+#~ msgstr "Fils"
+
+#~ msgid "Artists"
+#~ msgstr "Artistes"
+
+#~ msgid "Play the video"
+#~ msgstr "Jouer la vidéo"
+
+#~ msgid "Videos"
+#~ msgstr "Vidéos"
+
+#~ msgid "Tag:"
+#~ msgstr "Mot clé :"
+
+#~ msgid "Category:"
+#~ msgstr "Catégorie :"
+
+#~ msgid "Author:"
+#~ msgstr "Auteur :"
+
+#~ msgid "Related events"
+#~ msgstr "Événements associés"
+
+#~ msgid "Related posts"
+#~ msgstr "Articles associés"
+
#~ msgid "Tournées"
#~ msgstr "On tour"
from mezzanine.conf import settings
from random import shuffle
-from organization.festival.models import *
from organization.magazine.models import *
from organization.projects.models import *
featured_list.append(post)
for video in featured.videos.all():
featured_list.append(video)
- for artist in featured.artists.all():
- featured_list.append(artist)
for playlist in featured.playlists.all():
featured_list.append(playlist)
shuffle(featured_list)
@register.filter
def get_attr(obj, attr):
- return getattr(obj, attr)
+ return getattr(obj, attr)
+++ /dev/null
-"""
-Provides abstract models and admin features used throughout the various
-Mezzanine apps.
-"""
-from __future__ import unicode_literals
-
-default_app_config = 'organization.festival.apps.FestivalConfig'
+++ /dev/null
-from __future__ import unicode_literals
-
-from copy import deepcopy
-
-from django.contrib import admin
-from django.utils.translation import ugettext_lazy as _
-
-from mezzanine_agenda.models import Event, EventLocation
-from mezzanine_agenda.admin import *
-
-from mezzanine.conf import settings
-from mezzanine.core.admin import DisplayableAdmin, OwnableAdmin
-
-from organization.festival.models import *
-
-
-class ArtistAdmin(admin.ModelAdmin):
-
- model = Artist
-
-
-class ArtistAdminDisplayable(DisplayableAdmin):
-
- fieldsets = deepcopy(ArtistAdmin.fieldsets)
-
-
-# admin.site.register(Artist, ArtistAdminDisplayable)
+++ /dev/null
-from django.apps import AppConfig
-
-
-class FestivalConfig(AppConfig):
-
- name = 'organization.festival'
- label = 'organization-festival'
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Generated by Django 1.9.7 on 2016-09-01 15:26
-from __future__ import unicode_literals
-
-from django.db import migrations, models
-import django.db.models.deletion
-import mezzanine.core.fields
-import mezzanine.utils.models
-
-
-class Migration(migrations.Migration):
-
- initial = True
-
- dependencies = [
- ('sites', '0002_alter_domain_unique'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='Artist',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('keywords_string', models.CharField(blank=True, editable=False, max_length=500)),
- ('title', models.CharField(max_length=500, verbose_name='Title')),
- ('title_fr', models.CharField(max_length=500, null=True, verbose_name='Title')),
- ('title_en', models.CharField(max_length=500, null=True, verbose_name='Title')),
- ('slug', models.CharField(blank=True, help_text='Leave blank to have the URL auto-generated from the title.', max_length=2000, null=True, verbose_name='URL')),
- ('_meta_title', models.CharField(blank=True, help_text='Optional title to be used in the HTML title tag. If left blank, the main title field will be used.', max_length=500, null=True, verbose_name='Title')),
- ('description', models.TextField(blank=True, verbose_name='Description')),
- ('description_fr', models.TextField(blank=True, null=True, verbose_name='Description')),
- ('description_en', models.TextField(blank=True, null=True, verbose_name='Description')),
- ('gen_description', models.BooleanField(default=True, help_text='If checked, the description will be automatically generated from content. Uncheck if you want to manually set a custom description.', verbose_name='Generate description')),
- ('created', models.DateTimeField(editable=False, null=True)),
- ('updated', models.DateTimeField(editable=False, null=True)),
- ('status', models.IntegerField(choices=[(1, 'Draft'), (2, 'Published')], default=2, help_text='With Draft chosen, will only be shown for admin users on the site.', verbose_name='Status')),
- ('publish_date', models.DateTimeField(blank=True, db_index=True, help_text="With Published chosen, won't be shown until this time", null=True, verbose_name='Published from')),
- ('expiry_date', models.DateTimeField(blank=True, help_text="With Published chosen, won't be shown after this time", null=True, verbose_name='Expires on')),
- ('short_url', models.URLField(blank=True, null=True)),
- ('in_sitemap', models.BooleanField(default=True, verbose_name='Show in sitemap')),
- ('content', mezzanine.core.fields.RichTextField(verbose_name='Content')),
- ('content_fr', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
- ('content_en', mezzanine.core.fields.RichTextField(null=True, verbose_name='Content')),
- ('first_name', models.CharField(blank=True, max_length=255, null=True, verbose_name='first name')),
- ('last_name', models.CharField(blank=True, max_length=255, null=True, verbose_name='last name')),
- ('bio', mezzanine.core.fields.RichTextField(blank=True, verbose_name='biography')),
- ('bio_fr', mezzanine.core.fields.RichTextField(blank=True, null=True, verbose_name='biography')),
- ('bio_en', mezzanine.core.fields.RichTextField(blank=True, null=True, verbose_name='biography')),
- ('site', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to='sites.Site')),
- ],
- options={
- 'ordering': ['last_name'],
- 'verbose_name': 'artist',
- },
- bases=(models.Model, mezzanine.utils.models.AdminThumbMixin),
- ),
- ]
+++ /dev/null
-from django.db import models
-from django.utils.translation import ugettext_lazy as _
-from django.core.urlresolvers import reverse, reverse_lazy
-from django.conf import settings
-
-from mezzanine.core.models import RichText, Displayable, Slugged
-from mezzanine.core.fields import RichTextField, OrderField, FileField
-from mezzanine.utils.models import AdminThumbMixin, upload_to
-from mezzanine.blog.models import BlogPost
-from mezzanine.pages.models import Page
-
-from organization.core.models import *
-
-import requests
-from pyquery import PyQuery as pq
-
-
-class Artist(Displayable, RichText, AdminThumbMixin):
- """Artist"""
-
- first_name = models.CharField(_('first name'), max_length=255, blank=True, null=True)
- last_name = models.CharField(_('last name'), max_length=255, blank=True, null=True)
- bio = RichTextField(_('biography'), blank=True)
- search_fields = ("title", "bio")
-
- class Meta:
- verbose_name = _('artist')
- ordering = ['last_name',]
-
- def __unicode__(self):
- return self.title
-
- @property
- def name(self):
- return self.title
+++ /dev/null
-
-class FestivalRouter(object):
- """
- A router to control all database operations on models in festival
- """
-
- def db_for_read(self, model, **hints):
- if model._meta.app_label == 'festival':
- return 'default'
- return None
-
- def db_for_write(self, model, **hints):
- if model._meta.app_label == 'festival':
- return 'default'
- return None
-
- def allow_relation(self, obj1, obj2, **hints):
- if obj1._meta.app_label == 'festival' or \
- obj2._meta.app_label == 'festival':
- return True
- return None
-
- # def allow_migrate(self, db, app_label, model=None, **hints):
- # if app_label == 'festival':
- # return db == 'default'
- # return None
-
- def allow_migrate(self, db, app_label, model_name=None, **hints):
- if 'target_db' in hints:
- return db == hints['target_db']
- return True
+++ /dev/null
-# -*- coding: utf-8 -*-
-from mezzanine.pages.models import Page
-from mezzanine.blog.models import BlogPost
-from mezzanine.template import Library
-from mezzanine_agenda.models import Event
-from mezzanine.conf import settings
-from random import shuffle
-
-from organization.festival.models import *
-from organization.magazine.models import *
-
-register = Library()
-
-
-@register.filter
-def subtract(value, arg):
- return value - arg
-
-@register.as_tag
-def featured_edito(*args):
- qs = Page.objects.filter(slug="edito")
- if qs:
- return qs[0].get_content_model()
- else:
- return None
-
-@register.as_tag
-def featured_events(*args):
- featured = Featured.objects.all()
- if featured:
- return featured[0].events.order_by('start')
- return None
-
-@register.as_tag
-def featured(*args):
- featured_list = []
- featured = Featured.objects.filter(id=settings.HOME_FEATURED_ID)
- if featured:
- featured = featured[0]
- for post in featured.blogposts.all():
- featured_list.append(post)
- for video in featured.videos.all():
- featured_list.append(video)
- for artist in featured.artists.all():
- featured_list.append(artist)
- for playlist in featured.playlists.all():
- featured_list.append(playlist)
- shuffle(featured_list)
- return featured_list
-
-@register.as_tag
-def featured_breaking_news_content(*args):
- featured = Featured.objects.filter(id=settings.BREAKING_NEWS_FEATURED_ID)
- if featured:
- featured = featured[0]
- news = featured.pages.all()
- if news:
- return news[0].richtextpage.content
- else:
- return ''
- return ''
-
-@register.filter
-def get_class(obj):
- return obj.__class__.__name__
-
-@register.filter
-def unique_posts(events):
- post_list = []
- for event in events:
- for post in event.blog_posts.all():
- if not post in post_list:
- post_list.append(post)
- return post_list
-
-@register.filter
-def no_parents(events):
- return events.filter(parent=None)
+++ /dev/null
-from django.test import TestCase
-
-# Create your tests here.
+++ /dev/null
-from modeltranslation.translator import register, TranslationOptions
-
-from organization.festival.models import *
-
-@register(Artist)
-class ArtistTranslationOptions(TranslationOptions):
-
- fields = ('title', 'description', 'bio', 'content')
+++ /dev/null
-from __future__ import unicode_literals
-
-import django.views.i18n
-from django.conf.urls import patterns, include, url
-from django.conf.urls.i18n import i18n_patterns
-
-from mezzanine.core.views import direct_to_template
-from mezzanine.conf import settings
-
-from organization.festival.views import *
-
-
-urlpatterns = [
- url(r'^artists/$', ArtistListView.as_view(), name="festival-artist-list"),
- url(r'^artists/detail/(?P<slug>.*)/$', ArtistDetailView.as_view(), name="festival-artist-detail"),
-]
+++ /dev/null
-from django.shortcuts import render
-from django.views.generic import *
-from django.views.generic.base import *
-from django.shortcuts import get_object_or_404
-
-from organization.festival.models import *
-from mezzanine_agenda.models import EventLocation
-
-from organization.core.views import *
-
-
-class ArtistListView(ListView):
-
- model = Artist
- template_name='festival/artist_list.html'
-
- def get_queryset(self, **kwargs):
- return self.model.objects.published()
-
- def get_context_data(self, **kwargs):
- context = super(ArtistListView, self).get_context_data(**kwargs)
- return context
-
-
-class ArtistDetailView(SlugMixin, DetailView):
-
- model = Artist
- template_name='festival/artist_detail.html'
- context_object_name = 'artist'
-
- def get_context_data(self, **kwargs):
- context = super(ArtistDetailView, self).get_context_data(**kwargs)
- return context
_slash = "/" if settings.APPEND_SLASH else ""
urlpatterns = [
- url("^article/$", ArticleListView.as_view(), name="magazine-article-list"),
url("^article/detail/(?P<slug>.*)%s$" % _slash, ArticleDetailView.as_view(), name="magazine-article-detail"),
url("^topic/detail/(?P<slug>.*)%s$" % _slash, TopicDetailView.as_view(), name='topic-detail'),
url("^object-autocomplete/$", ObjectAutocomplete.as_view(), name='object-autocomplete'),
return context
-class ArticleListView(SlugMixin, ListView):
-
- model = Article
- template_name='magazine/article/article_list.html'
- context_object_name = 'article'
-
- def get_queryset(self, **kwargs):
- return self.model.objects.published(for_user=self.request.user).select_related()
-
- def get_context_data(self, **kwargs):
- context = super(ArticleListView, self).get_context_data(**kwargs)
- return context
-
-
class BriefDetailView(SlugMixin, DetailView):
model = Brief
url("^playlist/list/(?P<type>.*)$", PlaylistListView.as_view(), name="organization-playlist-list"),
url("^playlist/detail/(?P<slug>.*)/$", PlaylistDetailView.as_view(), name="organization-playlist-detail"),
url("^playlist-media-autocomplete/$", permission_required('playlist.can_edit')(PlayListMediaView.as_view()), name='media-autocomplete'),
- url("^media/detail/(?P<slug>.*)/$", MediaDetailView.as_view(), name="organization-media-detail"),
]
if self.q:
qs = qs.filter(title__istartswith=self.q)
return qs
-
-
-class MediaDetailView(SlugMixin, DetailView):
-
- model = Media
- template_name='media/media_detail.html'
- context_object_name = 'media'
urlpatterns = [
url("^", include('organization.core.urls')),
url("^", include('organization.pages.urls')),
- url("^", include('organization.festival.urls')),
url("^", include('organization.magazine.urls')),
url("^", include('organization.media.urls')),
url("^", include('organization.projects.urls')),
"organization.media",
"organization.pages",
"organization.network",
- "organization.festival",
"organization.magazine",
"organization.projects",
"organization.agenda",
--- /dev/null
+from django.contrib.sitemaps import Sitemap
+from mezzanine_agenda.models import Event
+from organization.agenda.models import *
+from organization.core.models import *
+from organization.job.models import *
+from organization.magazine.models import *
+from organization.media.models import *
+from organization.network.models import *
+from organization.pages.models import *
+from organization.projects.models import *
+from organization.shop.models import *
+
+
+class ArticleSiteMap(Sitemap):
+ changefreq = "weekly"
+ priority = 0.5
+
+ def items(self):
+ return Article.objects.published()
+
+ def lastmod(self, obj):
+ return obj.publish_date
+
+
+class PersonSiteMap(Sitemap):
+ changefreq = "weekly"
+ priority = 0.5
+
+ def items(self):
+ return Person.objects.published()
+
+ def lastmod(self, obj):
+ return obj.publish_date
+
+
+class ProjectSiteMap(Sitemap):
+ changefreq = "weekly"
+ priority = 0.5
+
+ def items(self):
+ return Project.objects.published()
+
+ def lastmod(self, obj):
+ return obj.publish_date
+
+
+class EventSiteMap(Sitemap):
+ changefreq = "weekly"
+ priority = 0.5
+
+ def items(self):
+ return Event.objects.published()
+
+ def lastmod(self, obj):
+ return obj.publish_date
+
+
+class PageSiteMap(Sitemap):
+ changefreq = "weekly"
+ priority = 0.5
+
+ def items(self):
+ return Page.objects.published()
+
+ def lastmod(self, obj):
+ return obj.publish_date
+
+
+class HomeSiteMap(Sitemap):
+ changefreq = "daily"
+ priority = 1
+
+ def items(self):
+ return Home.objects.published()
+
+ def lastmod(self, obj):
+ return obj.publish_date
+
+
+class PlaylistSiteMap(Sitemap):
+ changefreq = "weekly"
+ priority = 0.5
+
+ def items(self):
+ return Playlist.objects.published()
+
+ def lastmod(self, obj):
+ return obj.publish_date
<link rel="shortcut icon" href="{% static "img/favicons/favicon.ico" %}">
<link rel="icon" type="image/png" sizes="96x96" href="{% static "img/favicons/favicon-96x96.png" %}">
- {% ifinstalled mezzanine.blog %}
- <link rel="alternate" type="application/rss+xml" title="RSS" href="{% url "blog_post_feed" "rss" %}">
- <link rel="alternate" type="application/atom+xml" title="Atom" href="{% url "blog_post_feed" "atom" %}">
- {% endifinstalled %}
-
<link href='https://fonts.googleapis.com/css?family=Merriweather:400,300,700,900,300italic|Oswald:400,300,700' rel='stylesheet' type='text/css'>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDqF2kIHtUASr67QP-1bXRd6FPELDS4FSs&libraries=geometry"></script>
+++ /dev/null
-{% load blog_tags keyword_tags mezzanine_tags i18n %}
-
-{% block blog_recent_posts %}
-{% blog_recent_posts 5 as recent_posts %}
-{% if recent_posts %}
-<h3>{% trans "Recent Posts" %}</h3>
-<ul class="list-unstyled recent-posts">
-{% for recent_post in recent_posts %}
-<li>
- {% spaceless %}
- <a href="{{ recent_post.get_absolute_url }}">
- {% if settings.BLOG_USE_FEATURED_IMAGE and recent_post.featured_image %}
- <img src="{{ MEDIA_URL }}{% thumbnail recent_post.featured_image 24 24 %}">
- {% endif %}
- {{ recent_post.title }}
- </a>
- {% endspaceless %}
-</li>
-{% endfor %}
-</ul>
-{% endif %}
-{% endblock %}
-
-{% block blog_months %}
-{% blog_months as months %}
-{% if months %}
-<h3>{% trans "Archive" %}</h3>
-{% for month in months %}
- {% ifchanged month.date.year %}
- {% if not forloop.first %}</ul>{% endif %}
- <h6>{{ month.date.year }}</h6><ul class="list-unstyled">
- {% endifchanged %}
- <li><a href="{% url "blog_post_list_month" year=month.date.year month=month.date.month %}"
- >{{ month.date|date:"F" }}</a> ({{ month.post_count }})</li>
-{% endfor %}
-</ul>
-{% endif %}
-{% endblock %}
-
-{% block blog_categories %}
-{% blog_categories as categories %}
-{% if categories %}
-<h3>{% trans "Categories" %}</h3>
-<ul class="list-unstyled">
-{% for category in categories %}
-<li><a href="{% url "blog_post_list_category" category.slug %}"
- >{{ category }}</a> ({{ category.post_count }})</li>
-{% endfor %}
-</ul>
-{% endif %}
-{% endblock %}
-
-{% block blog_keywords %}
-{% keywords_for blog.blogpost as tags %}
-{% if tags %}
-<h3>{% trans "Tags" %}</h3>
-<ul class="list-inline tag-cloud">
-{% for tag in tags %}
-<li>
- <a href="{% url "blog_post_list_tag" tag.slug %}"
- class="tag-weight-{{ tag.weight }}">{{ tag }}</a>
- ({{ tag.item_count }})
-</li>
-{% endfor %}
-</ul>
-{% endif %}
-{% endblock %}
-
-{% block blog_authors %}
-{% blog_authors as authors %}
-{% if authors %}
-<h3>{% trans "Authors" %}</h3>
-<ul class="list-unstyled">
-{% for author in authors %}
- <li><a href="{% url "blog_post_list_author" author.username %}"
- >{{ author.get_full_name|default:author.username }}</a>
- ({{ author.post_count }})</li>
-{% endfor %}
-</ul>
-{% endif %}
-{% endblock %}
-
-{% block blog_feeds %}
-<h3>{% trans "Feeds" %}</h3>
-{% if tag %}
- <a href="{% url "blog_post_feed_tag" tag.slug "rss" %}">{% trans "RSS" %}</a> /
- <a href="{% url "blog_post_feed_tag" tag.slug "atom" %}">{% trans "Atom" %}</a>
-{% endif %}
-{% if category %}
- <a href="{% url "blog_post_feed_category" category.slug "rss" %}">{% trans "RSS" %}</a> /
- <a href="{% url "blog_post_feed_category" category.slug "atom" %}">{% trans "Atom" %}</a>
-{% endif %}
-{% if author %}
- <a href="{% url "blog_post_feed_author" author.username "rss" %}">{% trans "RSS" %}</a> /
- <a href="{% url "blog_post_feed_author" author.username "atom" %}">{% trans "Atom" %}</a>
-{% endif %}
-{% if not tag and not category and not author %}
- <a href="{% url "blog_post_feed" "rss" %}">{% trans "RSS" %}</a> /
- <a href="{% url "blog_post_feed" "atom" %}">{% trans "Atom" %}</a>
-{% endif %}
-{% endblock %}
+++ /dev/null
-{% load i18n pages_tags mezzanine_tags %}
-
-<div class="artist__item {% if not on_home %}msry__item {% endif %}">
- <div class="artist__item__inner">
- <a {% if post.content|removetags:"p"|slice:"4" == 'http' %}href="{{ post.content|removetags:'p' }}" target="_blank"{% else %}href="{% url 'blog_post_detail' post.slug %}"{% endif %} class="artist__item__inner">
- {% if post.featured_image %}
- <figure class="artist__item__img">
- <img src="{{ MEDIA_URL }}{% thumbnail post.featured_image 500 0 %}" alt="Article: {{ post.title }}">
- </figure>
- {% endif %}
- <h3 class="artist__item__name">
- <span>
- {{ post.title }}
- </span>
- </h3>
- {# <span class="artist__item__date">{% trans "published on" %} {{ post.publish_date|date:"DATE_FORMAT" }}</span>#}
- </a>
- </div>
-</div>
+++ /dev/null
-{% extends "base.html" %}
-{% load i18n %}
-{% load mezzanine_tags keyword_tags %}
-
-{% block title %}
-{{ artist.name }}
-{% endblock %}
-
-{% block main %}
-<div class="artist__detail">
- <p>
- {% if artist.photo %}
- <figure class="artist__figure img__align{% if artist.photo_alignment == 'left' %}--left{% elif artist.photo_alignment == 'right' %}--right{% else %}--center{% endif %}">
- <img src="{% if artist.photo_featured %}{{ artist.photo_featured.url }}{% else %}{{ artist.photo.url }}{% endif %}" />
- <figcaption class="artist__figure__copyright">
- {{ artist.photo_credits }}
- </figcaption>
- </figure>
- {% endif %}
- {{ artist.bio|safe }}
- <br style="clear: both;" />
- </p>
-</div>
-
-<hr style="margin-top: 3rem;">
-{% if artist.events.all %}
-<h2 class="section__title">{% trans "Also discover" %}</h2> <br>
-<div class="msry__container">
- <div class="msry__sizer"></div>
- {% for event in artist.events.all|no_parents %}
- {% include 'agenda/event/includes/event_card.html' with object=event %}
- {% 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 %}
-</div>
-{% endif %}
-{% endblock %}
+++ /dev/null
-{% extends "base.html" %}
-{% load i18n %}
-{% load mezzanine_tags keyword_tags %}
-
-{% block title %}
- {% trans "Artists" %}
-{% endblock %}
-
-{% block main %}
-<div class="artist__list msry__container">
- <div class="msry__sizer"></div>
- {% for artist in object_list %}
- {% include "festival/inc/artist_card.html" %}
- {% endfor %}
-</div>
-{% endblock %}
+++ /dev/null
-{% load i18n pages_tags mezzanine_tags %}
-
-<div class="artist__item {% if not on_home %}msry__item {% endif %}">
- <div class="artist__item__inner">
- <a href="{% url 'festival-artist-detail' artist.slug %}" class="artist__item__inner">
- <figure class="artist__item__img">
- <img src="{{ MEDIA_URL }}{% thumbnail artist.featured_image 500 0 %}" alt="Portrait {{ artist.name }}">
- </figure>
- <h3 class="artist__item__name">
- <span>
- {{ artist.name }}
- </span>
- </h3>
- </a>
- </div>
-</div>
+++ /dev/null
-{% load staticfiles %}
-
-<div class="audio__block">
- {% for audio in playlist.audios.all %}
- {% if forloop.first %}
- <div class="audio__player">
- <audio id="audio" preload="auto" tabindex="0" controls="">
- <source id="primarysrc" src="{{ audio.closed_source_url }}">
- <source id="secondarysrc" src="{{ audio.open_source_url }}">
- </audio>
- <span class="audio__title">
- {{ audio.title }}
- </span>
- </div>
- <ul id="playlist" class="audio__playlist">
- {% endif %}
- <li>
- <a href="{{ audio.closed_source_url }}" class="audio__playlist__item" data-altsrc="{{ audio.open_source_url }}">
- {{ audio.title }}
- </a>
- </li>
- {% endfor %}
- {% if forloop.first %}
- </ul>
- {% endif %}
-</div>
+++ /dev/null
-{% load i18n %}
-
-<div class="video__card {% if not on_home %}msry__item {% endif %}">
- <div class="video__card__thumbnail">
- <img src="{{ video.poster_url }}" alt="">
- </div>
- <div class="video__card__info">
- <h3 class="video__card__name">{{ video.title }}</h3>
- </div>
- <a href="{% url 'festival-video-detail' video.slug %}" class="video__card__link">{% trans "Play the video" %}</a>
-</div>
+++ /dev/null
-{% extends "base.html" %}
-{% load i18n %}
-{% load mezzanine_tags keyword_tags %}
-
-{% block title %}
-{{ video.title }}
-{% endblock %}
-
-{% block main %}
-
-<div class="video-html">
- {{ video.content|safe }}
-</div>
-
-<div class="embed-responsive">
- <video width="100%" poster="{{ video.poster_url }}" controls data-title="{{ video.title }}" preload="none">
- <source src="{{ video.open_source_url }}" type="{{ video.open_source_mime_type }}" />
- <source src="{{ video.closed_source_url }}" type="{{ video.closed_source_mime_type }}" />
- </video>
-</div>
-
-{% with video as object %}
- {% include "includes/share_buttons.html" %}
-{% endwith %}
-
-{% if video.event %}
-<div class="video-event">
- <h2 class="section__title">{% trans 'Also discover' %}</h2>
- <div class="msry__container">
- <div class="msry__sizer"></div>
- {% with video.event as event %}
- {% include 'agenda/event/includes/event_card.html' with object=event %}
- {% 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 %}
-
-</div>
-</div>
-{% endif %}
-
-{% endblock %}
+++ /dev/null
-{% extends "base.html" %}
-{% load i18n %}
-{% load mezzanine_tags keyword_tags %}
-
-{% block title %}
- {% trans "Videos" %}
-{% endblock %}
-
-{% block main %}
-
-{% if categories %}
-<ul class="list-inline tag-cloud">
-{% for cat in categories %}
- <li>
- <a href="{% url "festival-video-list-category" cat.slug %}" {% if category == cat %}class="is-active"{% endif %}>{{ cat }}</a> ({{ cat.count }})
- </li>
-{% endfor %}
-</ul>
-<br/>
-{% endif %}
-
-<div class="video__list msry__container">
- <div class="msry__sizer"></div>
- {% for video in object_list %}
- {% if video.status == 2 %}
- {% include 'festival/inc/video_card.html' %}
- {% endif %}
- {% endfor %}
-</div>
-{% endblock %}
+++ /dev/null
-{% load i18n event_tags %}
-{% all_events as events %}
-<h2 class="sidebar__title">{% trans "Festival calendar" %}</h2>
-
-<ul class="calendar">
- <li class="calendar__month">
- {# <div class="calendar__month__title">Juin / Juillet</div> #}
- <div class="calendar__day calendar__day-name">
- <div class="calendar__day-inner"><span>L</span></div>
- </div>
- <div class="calendar__day calendar__day-name">
- <div class="calendar__day-inner"><span>M</span></div>
- </div>
- <div class="calendar__day calendar__day-name">
- <div class="calendar__day-inner"><span>M</span></div>
- </div>
- <div class="calendar__day calendar__day-name">
- <div class="calendar__day-inner"><span>J</span></div>
- </div>
- <div class="calendar__day calendar__day-name">
- <div class="calendar__day-inner"><span>V</span></div>
- </div>
- <div class="calendar__day calendar__day-name">
- <div class="calendar__day-inner"><span>S</span></div>
- </div>
- <div class="calendar__day calendar__day-name">
- <div class="calendar__day-inner"><span>D</span></div>
- </div>
- <div class="calendar__day calendar__day-off">
- <div class="calendar__day-inner"></div>
- </div>
- <div class="calendar__day calendar__day-off">
- <div class="calendar__day-inner"></div>
- </div>
- <div class="calendar__day calendar__day-off">
- <div class="calendar__day-inner"></div>
- </div>
-
- {% all_days as days %}
- {% for day in days %}
- {% if day|events_in_day %}
- <div class="calendar__day calendar__day-active">
- <div class="calendar__day-inner">
- <span> <a href="{% url 'event_list_day' day.year day.month day.day %}">{{ day.day }}</a> </span>
- </div>
- </div>
- {% else %}
- <div class="calendar__day">
- <div class="calendar__day-inner"><span>{{ day.day }}</span></div>
- </div>
- {% endif %}
- {% endfor %}
-
- <div class="calendar__day calendar__day-off">
- <div class="calendar__day-inner"></div>
- </div>
- </li>
-</ul>
+++ /dev/null
-{% extends "base.html" %}
-{% load i18n mezzanine_tags blog_tags keyword_tags disqus_tags %}
-
-{% block meta_title %}{% if page %}{{ page.meta_title }}{% else %}{% trans "Articles" %}{% endif %}{% endblock %}
-
-{% block meta_keywords %}{% metablock %}
-{% keywords_for page as keywords %}
-{% for keyword in keywords %}
- {% if not forloop.first %}, {% endif %}
- {{ keyword }}
-{% endfor %}
-{% endmetablock %}{% endblock %}
-
-{% block meta_description %}{% metablock %}
-{{ page.description }}
-{% endmetablock %}{% endblock %}
-
-{% block title %}
-{% if page %}
-{% editable page.title %}{{ page.title }}{% endeditable %}
-{% else %}
-{% trans "Articles" %}
-{% endif %}
-{% endblock %}
-
-{% block breadcrumb_menu %}
-{{ block.super }}
-{% if tag or category or year or month or author %}
-<li>{% spaceless %}
-{% if tag %}
- {% trans "Tag:" %} {{ tag }}
-{% else %}{% if category %}
- {% trans "Category:" %} {{ category }}
-{% else %}{% if year or month %}
- {% if month %}{{ month }}, {% endif %}{{ year }}
-{% else %}{% if author %}
- {% trans "Author:" %} {{ author.get_full_name|default:author.username }}
-{% endif %}{% endif %}{% endif %}{% endif %}
-{% endspaceless %}
-</li>
-{% endif %}
-{% endblock %}
-
-{% block main %}
-
-{% comment %}
-{% if tag or category or year or month or author %}
- {% block blog_post_list_filterinfo %}
- <p>
- {% if tag %}
- {% trans "Viewing posts tagged" %} {{ tag }}
- {% else %}{% if category %}
- {% trans "Viewing posts for the category" %} <a href="{% url "blog_post_list_category" category.slug %}">{{ category }}</a>
- {% else %}{% if year or month %}
- {% trans "Viewing posts from" %} {% if month %}{{ month }}, {% endif %}
- {{ year }}
- {% else %}{% if author %}
- {% trans "Viewing posts by" %}
- {{ author.get_full_name|default:author.username }}
- {% endif %}{% endif %}{% endif %}{% endif %}
- {% endblock %}
- </p>
-{% else %}
-{% endcomment %}
-{% if page %}
-{% if page.get_content_model.content %}
- {% editable page.get_content_model.content %}
- {{ page.get_content_model.content|richtext_filters|safe }}
- {% endeditable %}
-{% endif %}
-{% else %}
- {% blog_categories as categories %}
- {% if categories %}
- <ul class="list-inline tag-cloud">
- {% for cat in categories %}
- <li>
- <a href="{% url "blog_post_list_category" cat.slug %}" {% if category == cat %}class="is-active"{% endif %}>{{ cat }}</a> ({{ cat.post_count }})
- </li>
- {% endfor %}
- </ul>
- <br/>
- {% endif %}
-{# {% endif %}#}
-
-{% endif %}
-
-<div class="msry__container">
- <div class="msry__sizer"></div>
-
- {% for article in article_list %}
- {% with article as post %}
- {# <span>{% trans "Article" %}</span>#}
- {% endwith %}
- {% endfor %}
-</div>
-
-{% if settings.COMMENTS_DISQUS_SHORTNAME %}
-{% include "generic/includes/disqus_counts.html" %}
-{% endif %}
-
-{% endblock %}
-
-{% block right_panel %}
-{% include "blog/includes/filter_panel.html" %}
-{% endblock %}
{{ page.richtextpage.content|richtext_filters|safe }}
{% endeditable %}
-{% block related_objects %}
-{% if page.featured.all %}
-<hr style="margin-top: 3rem;">
-
-{% if page.featured.all.0.events.all %}
-<h2 class="section__title">{% trans "Related events" %}</h2> <br>
-<div class="msry__container">
- <div class="msry__sizer"></div>
- {% for event in page.featured.all.0.events.all %}
- {% include 'agenda/event/includes/event_card.html' with object=event %}
- {% endfor %}
-</div>
-{% endif %}
-
-{% if page.featured.all.0.blogposts.all %}
-<h2 class="section__title">{% trans "Related posts" %}</h2> <br>
-<div class="msry__container">
- <div class="msry__sizer"></div>
- {% for post in page.featured.all.0.blogposts.all %}
- {% include 'blog/includes/post_card.html' %}
- {% endfor %}
-</div>
-{% endif %}
-
-{% endif %}
-{% endblock %}
{% endblock %}
from __future__ import unicode_literals
+from future.builtins import str
+
import django.views.i18n
+from django.views.i18n import javascript_catalog
from django.conf.urls import patterns, include, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
-
-from mezzanine.core.views import direct_to_template
+from django.contrib.sitemaps.views import sitemap
+from django.http import HttpResponse
from mezzanine.conf import settings
+from mezzanine.core.sitemaps import DisplayableSitemap
+from mezzanine.core.views import direct_to_template
+from django.contrib.sitemaps.views import sitemap
+from sitemaps import *
admin.autodiscover()
+sitemaps = {
+ 'home_sitemap' : HomeSiteMap(),
+ 'article_sitemap' : ArticleSiteMap(),
+ 'person_sitemap' : PersonSiteMap(),
+ 'project_sitemap' : ProjectSiteMap(),
+ 'event_sitemap' : EventSiteMap(),
+ 'page_sitemap' : PageSiteMap(),
+ 'playlist_sitemap' : PlaylistSiteMap(),
+}
# Add the urlpatterns for any custom Django applications here.
# You can also change the ``home`` view to add your own functionality
# to the project's homepage.
url("^", include('organization.urls')),
url("^styles/$", direct_to_template, {"template": "styles.html"}, name="styles"),
+ # sitemap
+ url(r'^sitemap\.xml$', sitemap, {'sitemaps': sitemaps},
+ name='django.contrib.sitemaps.views.sitemap'),
+
# We don't want to presume how your homepage works, so here are a
# few patterns you can use to set it up.
# ``mezzanine.urls``, go right ahead and take the parts you want
# from it, and use them directly below instead of using
# ``mezzanine.urls``.
- url("^", include("mezzanine.urls")),
+ # url("^", include("mezzanine.urls")),
# MOUNTING MEZZANINE UNDER A PREFIX
# ---------------------------------
# need to use the ``SITE_PREFIX`` setting as well.
# ("^%s/" % settings.SITE_PREFIX, include("mezzanine.urls"))
+
+
+]
+
+
+#################################################
+# MEZZANINE CONF CUSTOM #
+#################################################
+# JavaScript localization feature
+js_info_dict = {'domain': 'django'}
+urlpatterns += [
+ url(r'^jsi18n/(?P<packages>\S+?)/$', javascript_catalog, js_info_dict),
+]
+
+if settings.DEBUG and "debug_toolbar" in settings.INSTALLED_APPS:
+ try:
+ import debug_toolbar
+ except ImportError:
+ pass
+ else:
+ urlpatterns += [
+ url(r'^__debug__/', include(debug_toolbar.urls)),
+ ]
+
+# Django's sitemap app.
+if "django.contrib.sitemaps" in settings.INSTALLED_APPS:
+ sitemaps = {"sitemaps": {"all": DisplayableSitemap}}
+ urlpatterns += [
+ url("^sitemap\.xml$", sitemap, sitemaps),
+ ]
+
+# Return a robots.txt that disallows all spiders when DEBUG is True.
+if getattr(settings, "DEBUG", False):
+ urlpatterns += [
+ url("^robots.txt$",
+ lambda r: HttpResponse("User-agent: *\nDisallow: /",
+ content_type="text/plain")),
+ ]
+
+# Miscellanous Mezzanine patterns.
+urlpatterns += [
+ url("^", include("mezzanine.core.urls")),
+ url("^", include("mezzanine.generic.urls")),
]
+# Mezzanine's Accounts app
+if "mezzanine.accounts" in settings.INSTALLED_APPS:
+ # We don't define a URL prefix here such as /account/ since we want
+ # to honour the LOGIN_* settings, which Django has prefixed with
+ # /account/ by default. So those settings are used in accounts.urls
+ urlpatterns += [
+ url("^", include("mezzanine.accounts.urls")),
+ ]
+
+# Mezzanine's Blog app.
+# blog_installed = "mezzanine.blog" in settings.INSTALLED_APPS
+# if blog_installed:
+# BLOG_SLUG = settings.BLOG_SLUG.rstrip("/")
+# if BLOG_SLUG:
+# BLOG_SLUG += "/"
+# blog_patterns = [
+# url("^%s" % BLOG_SLUG, include("mezzanine.blog.urls")),
+# ]
+# urlpatterns += blog_patterns
+
+# Mezzanine's Pages app.
+PAGES_SLUG = ""
+if "mezzanine.pages" in settings.INSTALLED_APPS:
+ # No BLOG_SLUG means catch-all patterns belong to the blog,
+ # so give pages their own prefix and inject them before the
+ # blog urlpatterns.
+ # if blog_installed and not BLOG_SLUG.rstrip("/"):
+ # PAGES_SLUG = getattr(settings, "PAGES_SLUG", "pages").strip("/") + "/"
+ # blog_patterns_start = urlpatterns.index(blog_patterns[0])
+ # urlpatterns[blog_patterns_start:len(blog_patterns)] = [
+ # url("^%s" % str(PAGES_SLUG), include("mezzanine.pages.urls")),
+ # ]
+ # else:
+ urlpatterns += [
+ url("^", include("mezzanine.pages.urls")),
+ ]
+
# Adds ``STATIC_URL`` to the context of error pages, so that error
# pages can use JS, CSS and images.
handler404 = "mezzanine.core.views.page_not_found"