Hotfix appliqué en prod pour que le site démarre #31

Merged
mpepin merged 3 commits from kerl/hotfix_prod into master 2020-09-12 19:07:13 +02:00
2 changed files with 5 additions and 5 deletions

View file

@ -55,9 +55,9 @@ def calendar(request, pYear, pMonth):
lMonth = int(pMonth) lMonth = int(pMonth)
lCalendarFromMonth = datetime(lYear, lMonth, 1) lCalendarFromMonth = datetime(lYear, lMonth, 1)
lCalendarToMonth = datetime(lYear, lMonth, monthrange(lYear, lMonth)[1]) lCalendarToMonth = datetime(lYear, lMonth, monthrange(lYear, lMonth)[1])
lEvents = Event.objects.filter(date__gte=lCalendarFromMonth, lEvents = Event.objects.filter(
date__lte=lCalendarToMonth, date__gte=lCalendarFromMonth, date__lte=lCalendarToMonth
calendrier=True) )
if request.user.is_authenticated: if request.user.is_authenticated:
lEvents = Event.objects.filter(date__gte=lCalendarFromMonth, lEvents = Event.objects.filter(date__gte=lCalendarFromMonth,
date__lte=lCalendarToMonth) date__lte=lCalendarToMonth)

View file

@ -34,7 +34,7 @@ class Partition(models.Model):
class Meta: class Meta:
verbose_name = _('Morceau') verbose_name = _('Morceau')
verbose_name_plural = _('Morceaux') verbose_name_plural = _('Morceaux')
ordering = ('-'+Lower('nom'),) ordering = (Lower('nom'),)
class PartitionSet(models.Model): class PartitionSet(models.Model):
@ -54,4 +54,4 @@ class PartitionSet(models.Model):
class Meta: class Meta:
verbose_name = _('Morceau') verbose_name = _('Morceau')
verbose_name_plural = _('Morceaux') verbose_name_plural = _('Morceaux')
ordering = ('-'+Lower('nom'),) ordering = (Lower('nom'),)