--- /dev/null
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.2 on 2016-04-10 19:48
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('festival', '0018_auto_20160407_2301'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='featured',
+ name='blogposts',
+ field=models.ManyToManyField(blank=True, related_name='featured', to='blog.BlogPost', verbose_name='blog posts'),
+ ),
+ migrations.AlterField(
+ model_name='featured',
+ name='pages',
+ field=models.ManyToManyField(blank=True, related_name='featured', to='pages.Page', verbose_name='pages'),
+ ),
+ ]
url(r'^artists/(?P<slug>.*)/$', ArtistDetailView.as_view(), name="festival-artist-detail"),
url(r'^videos/$', VideoListView.as_view(), name="festival-video-list"),
url(r'^videos/(?P<slug>.*)/$', VideoDetailView.as_view(), name="festival-video-detail"),
- url(r'^locations/$', LocationListView.as_view(), name="festival-location-list"),
]
def get_context_data(self, **kwargs):
context = super(VideoDetailView, self).get_context_data(**kwargs)
return context
-
-
-class LocationListView(ListView):
-
- model = EventLocation
- template_name='agenda/event_location_list.html'
-
- def get_context_data(self, **kwargs):
- context = super(LocationListView, self).get_context_data(**kwargs)
- return context
--- /dev/null
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.2 on 2016-04-10 19:48
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import mezzanine.core.fields
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('mezzanine_agenda', '0006_remove_event_featured'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='EventPrice',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('price', models.FloatField(verbose_name='price')),
+ ('unit', models.CharField(blank=True, max_length=16, verbose_name='Unit')),
+ ],
+ options={
+ 'verbose_name': 'Event price',
+ 'verbose_name_plural': 'Event pricies',
+ },
+ ),
+ migrations.AlterModelOptions(
+ name='event',
+ options={'ordering': ('start',), 'verbose_name': 'Event', 'verbose_name_plural': 'Events'},
+ ),
+ migrations.AddField(
+ model_name='eventlocation',
+ name='description',
+ field=mezzanine.core.fields.RichTextField(blank=True, verbose_name='description'),
+ ),
+ migrations.AddField(
+ model_name='eventlocation',
+ name='link',
+ field=models.URLField(blank=True, max_length=512),
+ ),
+ migrations.AddField(
+ model_name='event',
+ name='prices',
+ field=models.ManyToManyField(blank=True, related_name='events', to='mezzanine_agenda.EventPrice', verbose_name='prices'),
+ ),
+ ]
--- /dev/null
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.2 on 2016-04-10 19:49
+from __future__ import unicode_literals
+
+from django.db import migrations
+import mezzanine.core.fields
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('mezzanine_agenda', '0007_auto_20160410_2148'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='eventlocation',
+ name='description_en',
+ field=mezzanine.core.fields.RichTextField(blank=True, null=True, verbose_name='description'),
+ ),
+ migrations.AddField(
+ model_name='eventlocation',
+ name='description_fr',
+ field=mezzanine.core.fields.RichTextField(blank=True, null=True, verbose_name='description'),
+ ),
+ ]
--- /dev/null
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.2 on 2016-04-10 19:54
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('mezzanine_agenda', '0008_auto_20160410_2149'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='eventlocation',
+ name='featured_name',
+ field=models.CharField(blank=True, max_length=512, null=True, verbose_name='fearured name'),
+ ),
+ migrations.AlterField(
+ model_name='eventlocation',
+ name='link',
+ field=models.URLField(blank=True, max_length=512, null=True),
+ ),
+ ]
</div>
{% endblock %}
+{% comment %}
{% if event.location %}
<h3 class="section__title">Le lieu :</h3>
{% block event_detail_location %}
-{% editable event.location %}
+<a href="{% url 'location-detail' event.location.slug %}">{{ event.location }}</a>
<p>
<p>{{ event.location }} {{ event.location.address|linebreaksbr }}</p>
<a href="{{ event|google_nav_url }}" target="_blank">
<a href="{{ event|google_nav_url }}" target="_blank" class="">
{% google_static_map event 900 300 15 %}
</a/>
-{% endeditable %}
{% endblock %}
{% endif %}
+{% endcomment %}
{% block event_detail_keywords %}
{% keywords_for event as tags %}
--- /dev/null
+{% extends "agenda/event_location_list.html" %}
+{% load i18n future mezzanine_tags event_tags keyword_tags disqus_tags %}
+
+{% block main %}
+ {% include "agenda/includes/event_location.html" %}
+{% endblock %}
{% endblock %}
{% block main %}
-
<div id="tabs" class="c-tabs">
<div class="c-tabs-nav">
{% for location in object_list %}
- <a href="#" class="c-tabs-nav__link {% if forloop.first %}is-active{% endif %}">{{ location.title }}</a>
+ <a href="#" class="c-tabs-nav__link {% if forloop.first %}is-active{% endif %}">
+ {% if location.featured_name %}{{ location.featured_name }}{% else %}{{ location.title }}{% endif %}</a>
{% endfor %}
</div>
{% for location in object_list %}
<div class="c-tab {% if forloop.first %}is-active{% endif %}">
- <div class="c-tab__content">
- <h3 class="location__title">{{ location.title }}</h3>
- {% block event_detail_location %}
- {% editable event.location %}
- <p>
- {{ location.address }}<br />
- <a href="{{ location|google_nav_url }}" target="_blank" class="">{% trans "Click to get the interactive map" %}</a>
- </p>
- <a href="{{ location|google_nav_url }}" target="_blank" class="location__map">
- {% google_static_map location 900 300 15 %}
- </a/>
- {% endeditable %}
- {% endblock %}
- </div>
+ {% include "agenda/includes/event_location.html" %}
</div>
{% endfor %}
-
-
-
{% endblock %}
{% block right_panel %}
--- /dev/null
+{% load i18n future mezzanine_tags event_tags %}
+
+<div class="c-tab__content">
+ <h3 class="location__title">{% if location.featured_name %}{{ location.featured_name }}{% else %}{{ location.title }}{% endif %}</h3>
+ {% block event_detail_location %}
+ <p>
+ {{ location.address }}<br />
+ <a href="{{ location.link }}" target="_blank">{{ location.link }}</a><br />
+ </p>
+ <a href="{{ location|google_nav_url }}" target="_blank" class="location__map">
+ {% google_static_map location 900 300 15 %}
+ </a/><br />
+ <a href="{{ location|google_nav_url }}" target="_blank" class="">{% trans "Click to get the interactive map" %}</a>
+ <p>{{ location.description|safe }}</p>
+ {% endblock %}
+</div>
{% endif %}
{% if event.location %}
{# <a href="{% url "event_list_location" event.location.slug %}" class="event__meta__location">{{ event.location }}</a>#}
- <span class="event__meta__location">{{ event.location }}</span>
+ <br />
+ <a href="{% url 'location-detail' event.location.slug %}">{{ event.location }}</a>
{% endif %}
</div>
</div>
from modeltranslation.translator import register, TranslationOptions
-from mezzanine_agenda.models import Event
+from mezzanine_agenda.models import Event, EventLocation
from festival.models import *
fields = ('title', 'description', 'content')
+@register(EventLocation)
+class EventLocationTranslationOptions(TranslationOptions):
+
+ fields = ('description',)
@register(Artist)
class ArtistTranslationOptions(TranslationOptions):