]> git.parisson.com Git - mezzo.git/commitdiff
Clean url / create sitemap / delete festival
authorEmilie <zawadzki@ircam.fr>
Fri, 18 Nov 2016 11:55:30 +0000 (12:55 +0100)
committerEmilie <zawadzki@ircam.fr>
Fri, 18 Nov 2016 11:55:30 +0000 (12:55 +0100)
37 files changed:
app/local_settings.py
app/locale/fr/LC_MESSAGES/django.mo
app/locale/fr/LC_MESSAGES/django.po
app/organization/core/templatetags/organization_tags.py
app/organization/festival/__init__.py [deleted file]
app/organization/festival/admin.py [deleted file]
app/organization/festival/apps.py [deleted file]
app/organization/festival/migrations/0001_initial.py [deleted file]
app/organization/festival/migrations/__init__.py [deleted file]
app/organization/festival/models.py [deleted file]
app/organization/festival/routers.py [deleted file]
app/organization/festival/templatetags/festival_tags.py [deleted file]
app/organization/festival/tests.py [deleted file]
app/organization/festival/translation.py [deleted file]
app/organization/festival/urls.py [deleted file]
app/organization/festival/views.py [deleted file]
app/organization/magazine/urls.py
app/organization/magazine/views.py
app/organization/media/urls.py
app/organization/media/views.py
app/organization/urls.py
app/settings.py
app/sitemaps.py [new file with mode: 0644]
app/templates/base.html
app/templates/blog/includes/filter_panel.html [deleted file]
app/templates/blog/includes/post_card.html [deleted file]
app/templates/festival/artist_detail.html [deleted file]
app/templates/festival/artist_list.html [deleted file]
app/templates/festival/inc/artist_card.html [deleted file]
app/templates/festival/inc/audio_playlist.html [deleted file]
app/templates/festival/inc/video_card.html [deleted file]
app/templates/festival/video_detail.html [deleted file]
app/templates/festival/video_list.html [deleted file]
app/templates/includes/calendar.html [deleted file]
app/templates/magazine/article/article_list.html [deleted file]
app/templates/pages/richtextpage.html
app/urls.py

index e3ab9f24013c4cc2ca8b39d1af6c776424ea7ce7..de55255fadb2b1d3eda8099b44462934a59a7750 100644 (file)
@@ -137,7 +137,6 @@ ADMIN_MENU_ORDER = (
                     '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')),
 )
index 54b3655cb8d01a6cc85fc01bf1e5cdd7a869716f..cbd3e77a6eb430eb6feee6ec5e94ce7745d7b1eb 100644 (file)
Binary files a/app/locale/fr/LC_MESSAGES/django.mo and b/app/locale/fr/LC_MESSAGES/django.mo differ
index 61fc63d35a3f8895a4ff4d17b54b0dc04c7b8b51..36b3b6342b64f2bb5b96cfa72f4f1e8f57089b95 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 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"
@@ -67,14 +67,10 @@ msgid "Jobs"
 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 ""
 
@@ -356,24 +352,14 @@ msgstr "pays"
 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 ""
@@ -668,6 +654,10 @@ msgstr "genre"
 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 ""
@@ -1982,16 +1972,20 @@ msgstr "Événements du lieu"
 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"
 
@@ -2032,50 +2026,15 @@ msgid "Recent Events"
 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"
 
@@ -2186,18 +2145,6 @@ msgstr ""
 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
@@ -2330,10 +2277,6 @@ msgstr ""
 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 ""
@@ -2463,28 +2406,14 @@ 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
@@ -2559,14 +2488,6 @@ msgstr ""
 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"
@@ -2584,6 +2505,10 @@ msgstr "Demo"
 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"
@@ -2942,6 +2867,42 @@ msgstr ""
 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"
 
index 731abfd02de2e36d46b924fdad22bde72611eb18..5e9253d955ac0a8f0463201af08992ebc93b58be 100644 (file)
@@ -8,7 +8,6 @@ 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 *
 from organization.projects.models import *
 
@@ -51,8 +50,6 @@ def featured(*args):
             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)
@@ -183,4 +180,4 @@ def unspam(email):
 
 @register.filter
 def get_attr(obj, attr):
-    return getattr(obj, attr)  
+    return getattr(obj, attr)
diff --git a/app/organization/festival/__init__.py b/app/organization/festival/__init__.py
deleted file mode 100644 (file)
index e5988d7..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-"""
-Provides abstract models and admin features used throughout the various
-Mezzanine apps.
-"""
-from __future__ import unicode_literals
-
-default_app_config = 'organization.festival.apps.FestivalConfig'
diff --git a/app/organization/festival/admin.py b/app/organization/festival/admin.py
deleted file mode 100644 (file)
index f484339..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-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)
diff --git a/app/organization/festival/apps.py b/app/organization/festival/apps.py
deleted file mode 100644 (file)
index 4b52512..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-from django.apps import AppConfig
-
-
-class FestivalConfig(AppConfig):
-
-    name = 'organization.festival'
-    label = 'organization-festival'
diff --git a/app/organization/festival/migrations/0001_initial.py b/app/organization/festival/migrations/0001_initial.py
deleted file mode 100644 (file)
index bb1dea1..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-# -*- 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),
-        ),
-    ]
diff --git a/app/organization/festival/migrations/__init__.py b/app/organization/festival/migrations/__init__.py
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/app/organization/festival/models.py b/app/organization/festival/models.py
deleted file mode 100644 (file)
index f2d55d5..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-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
diff --git a/app/organization/festival/routers.py b/app/organization/festival/routers.py
deleted file mode 100644 (file)
index 6bde6a3..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-
-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
diff --git a/app/organization/festival/templatetags/festival_tags.py b/app/organization/festival/templatetags/festival_tags.py
deleted file mode 100644 (file)
index f2c974b..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-# -*- 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)
diff --git a/app/organization/festival/tests.py b/app/organization/festival/tests.py
deleted file mode 100644 (file)
index 7ce503c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-from django.test import TestCase
-
-# Create your tests here.
diff --git a/app/organization/festival/translation.py b/app/organization/festival/translation.py
deleted file mode 100644 (file)
index b9e4936..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-from modeltranslation.translator import register, TranslationOptions
-
-from organization.festival.models import *
-
-@register(Artist)
-class ArtistTranslationOptions(TranslationOptions):
-
-    fields = ('title', 'description', 'bio', 'content')
diff --git a/app/organization/festival/urls.py b/app/organization/festival/urls.py
deleted file mode 100644 (file)
index c13eedb..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-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"),
-]
diff --git a/app/organization/festival/views.py b/app/organization/festival/views.py
deleted file mode 100644 (file)
index beba181..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-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
index 13cb07292d9ff7fdc5f5346fc12d554f1e7b262e..a13a5a20cf36d136776530c3c75aba5ec796d92e 100644 (file)
@@ -12,7 +12,6 @@ from organization.magazine.views import *
 _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'),
index 0b7f10a9e5395f08023c34b4c6caebff4ac1088b..d917465f4a1028d121fa4ad4c48c21500c028bc9 100644 (file)
@@ -56,20 +56,6 @@ class ArticleDetailView(SlugMixin, DetailView):
         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
index 328efb7f9c19bd6fb5c7d9f32d2964be8bcd0b76..9ccd3320bccc295039763b356b102dd46c262b91 100644 (file)
@@ -16,5 +16,4 @@ urlpatterns = [
     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"),
 ]
index 5b04af6f7ad64b091caac4c7fe859b8d8f1baf23..e5d761617ed60caa4097d2993cca835b4c87fdd7 100644 (file)
@@ -74,10 +74,3 @@ class PlayListMediaView(autocomplete.Select2QuerySetView):
         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'
index d197a151369fb8723b39b7160e33b50c4f306775..7e80a5817b5a679bb28b673710f4f55b05eb01be 100644 (file)
@@ -14,7 +14,6 @@ from mezzanine.conf import settings
 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')),
index 890d51d1bd0ef2b347d04c43c0476d3853273eec..c40b08c07eb4d6e2f2605f0a03b50b73bb7e2a79 100644 (file)
@@ -227,7 +227,6 @@ INSTALLED_APPS = [
     "organization.media",
     "organization.pages",
     "organization.network",
-    "organization.festival",
     "organization.magazine",
     "organization.projects",
     "organization.agenda",
diff --git a/app/sitemaps.py b/app/sitemaps.py
new file mode 100644 (file)
index 0000000..eb2ff03
--- /dev/null
@@ -0,0 +1,88 @@
+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
index e10af1bb92b3c1d188968b8ac56facf79e807594..7e0bc2b2fe7b1b6144c02ee67e07211dfce8ae06 100644 (file)
        <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>
 
diff --git a/app/templates/blog/includes/filter_panel.html b/app/templates/blog/includes/filter_panel.html
deleted file mode 100644 (file)
index d2817d8..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-{% 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 %}
diff --git a/app/templates/blog/includes/post_card.html b/app/templates/blog/includes/post_card.html
deleted file mode 100644 (file)
index 43c3c8d..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-{% 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>
diff --git a/app/templates/festival/artist_detail.html b/app/templates/festival/artist_detail.html
deleted file mode 100644 (file)
index 38d7cca..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-{% 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 %}
diff --git a/app/templates/festival/artist_list.html b/app/templates/festival/artist_list.html
deleted file mode 100644 (file)
index ba6e6a6..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-{% 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 %}
diff --git a/app/templates/festival/inc/artist_card.html b/app/templates/festival/inc/artist_card.html
deleted file mode 100644 (file)
index 21c3bab..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-{% 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>
diff --git a/app/templates/festival/inc/audio_playlist.html b/app/templates/festival/inc/audio_playlist.html
deleted file mode 100644 (file)
index 8347873..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-{% 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>
diff --git a/app/templates/festival/inc/video_card.html b/app/templates/festival/inc/video_card.html
deleted file mode 100644 (file)
index 3d5bb2e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-{% 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>
diff --git a/app/templates/festival/video_detail.html b/app/templates/festival/video_detail.html
deleted file mode 100644 (file)
index f2c46b0..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-{% 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 %}
diff --git a/app/templates/festival/video_list.html b/app/templates/festival/video_list.html
deleted file mode 100644 (file)
index 550269d..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-{% 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 %}
diff --git a/app/templates/includes/calendar.html b/app/templates/includes/calendar.html
deleted file mode 100644 (file)
index 23491b1..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-{% 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>
diff --git a/app/templates/magazine/article/article_list.html b/app/templates/magazine/article/article_list.html
deleted file mode 100644 (file)
index 0ca5f94..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-{% 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 %}
index 31a96068df69f4cd743449bbdafdda2346974e19..5e974da6029a985a54fff27b97870b832bc17288 100644 (file)
@@ -8,31 +8,5 @@
 {{ 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 %}
index e4210986554320818ad35bb338a8c0009c35c729..e0a75b5263fc065e02a35b578e2bc16d97cf4d2d 100644 (file)
@@ -1,15 +1,31 @@
 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.
@@ -31,6 +47,10 @@ urlpatterns += [
     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.
 
@@ -82,7 +102,7 @@ urlpatterns += [
     # ``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
     # ---------------------------------
@@ -99,8 +119,88 @@ urlpatterns += [
     # 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"