import os
from django.utils.translation import ugettext_lazy as _
+from datetime import datetime, date
DEBUG = True if os.environ.get('DEBUG', 'True') else False
#SHOP_CURRENCY_LOCALE = ''
SHOP_USE_VARIATIONS = True
SHOP_USE_RATINGS = False
+
+
+date_now = datetime.now()
+CURRENT_SEASON = int(date_now.year) - 1 if datetime(date_now.year, 1,1) <= date_now and date_now <= datetime(date_now.year, 7, 31) else date_now.year
+CURRENT_SEASON_STYLED = str(CURRENT_SEASON)[-2:]+"."+str(CURRENT_SEASON+1)[-2:]
--- /dev/null
+from django.conf import settings # import the settings file
+
+
+def static(request):
+
+ return {'CURRENT_SEASON': settings.CURRENT_SEASON,
+ 'CURRENT_SEASON_STYLED': settings.CURRENT_SEASON_STYLED}
'django.core.context_processors.request',
'django.core.context_processors.tz',
'mezzanine.conf.context_processors.settings',
- 'mezzanine.pages.context_processors.page')}}]
+ 'mezzanine.pages.context_processors.page',
+ 'organization.core.context_processors.static')}}]
# List of middleware classes to use. Order is important; in the request phase,
# these middleware classes will be applied in the order given, and in the
raise e
+
+
####################
# DYNAMIC S ETTINGS #
####################
{% if tag and tag|tag_is_excluded %}
{% trans "Tournées" %}
{% else %}
- {% trans "Rendez-vous" %}
+ {% if is_archive %}
+ {% trans "Archives" %}
+ {% else %}
+ {% trans "Events" %}
+ {% endif %}
{% endif %}
{% endif %}
</h1>
<div class="col-sm-3 col-lg-2 page__sidebar">
<div style="position: relative;" >
-
- {% if tag and not tag|tag_is_excluded or not tag %}
+ {% if tag and not tag|tag_is_excluded or not tag and not is_archive %}
<a class="banner banner--light banner--sidebar" href="{% url 'event_list_tag' 'tournees' %}" style="background-image:url({% static 'img/services/tours.jpg' %});">
<div class="banner__content">
<div class="banner__title fsxxxl">
- Tournées 16.17
+ Tournées {{ CURRENT_SEASON_STYLED }}
</div>
<div class="banner__desc fss">
Campo Santo, Songes et Métamorphoses, Providences, UM souverain moteur de toutes choses...
<ul class="nav-tree nav-tree--level-{{ branch_level }}" data-sticky data-sticky-parent="row" data-sticky-offset="100" data-sticky-detach-at="971">
<li class="nav-tree__item">
- <a class="nav-tree__link active" href="{{ page.get_absolute_url }}">
+ <a class="nav-tree__link active" href="{% url 'event_list' %}">
{% if tag and tag|tag_is_excluded %}
{% trans "Tournées" %}
{% else %}
</li>
- {% if tag and not tag|tag_is_excluded or not tag %}
+ {% if tag and not tag|tag_is_excluded or not tag and not is_archive %}
{% keywords_for mezzanine_agenda.event as tags %}
{# {% all_events as all_events %}#}
</div>
</div>
-
- {% pagination_for events %}
-
+ {% if not is_archive %}
+ <div><a href="{% url "event_list_year" CURRENT_SEASON %}" title="{% trans 'archive' %}">{% trans 'archive' %}</div>
+ {% endif %}
</div>
{% endblock %}
<div class="banner__content">
<div class="banner__title fsxxxl">
- Tournées 16.17
+ Tournées {{ CURRENT_SEASON_STYLED }}
</div>
<div class="banner__desc fss">
Campo Santo, Songes et Métamorphoses, Providences, UM souverain moteur de toutes choses...