Project

General

Profile

« Previous | Next » 

Revision e6e5249f

Added by Benjamin Dauvergne over 13 years ago

personnes: use localized month names in the holidays view

View differences:

calebasse/personnes/views.py
from django.contrib.auth.models import User
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.utils.dateformat import format as date_format
from calebasse import cbv, models as cb_models
from calebasse.ressources.models import Service
......
if holiday.start_date <= today <= holiday.end_date:
currents.append(holiday_tpl)
start_date = max(holiday.start_date, filter_start_date)
month_name = start_date.strftime('%B')
month_name = date_format(start_date, 'F')
key = start_date.year, start_date.month, month_name
futures[key].append(holiday_tpl)

Also available in: Unified diff