From c33860bb0be248641cbab2beae4998e8b4c51954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 20 Dec 2019 13:08:04 +0100 Subject: [PATCH] misc: remove usage of @python_2_unicode_compatible (#38665) --- chrono/agendas/models.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/chrono/agendas/models.py b/chrono/agendas/models.py index d98af06d..f6fbe6fa 100644 --- a/chrono/agendas/models.py +++ b/chrono/agendas/models.py @@ -27,7 +27,7 @@ from django.db import models, transaction from django.db.models import Q from django.urls import reverse from django.utils.dates import WEEKDAYS -from django.utils.encoding import force_text, python_2_unicode_compatible +from django.utils.encoding import force_text from django.utils.formats import date_format from django.utils.text import slugify from django.utils.timezone import localtime, now, make_aware, make_naive, is_aware @@ -186,7 +186,6 @@ class Agenda(models.Model): WEEKDAYS_LIST = sorted(WEEKDAYS.items(), key=lambda x: x[0]) -@python_2_unicode_compatible class TimeSlot(object): def __init__(self, start_datetime, meeting_type, desk): self.start_datetime = start_datetime @@ -199,7 +198,6 @@ class TimeSlot(object): return date_format(self.start_datetime, format='DATETIME_FORMAT') -@python_2_unicode_compatible class TimePeriod(models.Model): weekday = models.IntegerField(_('Week day'), choices=WEEKDAYS_LIST) start_time = models.TimeField(_('Start')) @@ -298,7 +296,6 @@ class MeetingType(models.Model): } -@python_2_unicode_compatible class Event(models.Model): agenda = models.ForeignKey(Agenda, on_delete=models.CASCADE) start_datetime = models.DateTimeField(_('Date/time')) @@ -464,7 +461,6 @@ class Booking(models.Model): return ics.serialize() -@python_2_unicode_compatible class Desk(models.Model): agenda = models.ForeignKey(Agenda, on_delete=models.CASCADE) label = models.CharField(_('Label'), max_length=150) @@ -648,7 +644,6 @@ class Desk(models.Model): return openslots.search(aware_date, aware_next_date) -@python_2_unicode_compatible class TimePeriodExceptionSource(models.Model): desk = models.ForeignKey(Desk, on_delete=models.CASCADE) ics_filename = models.CharField(null=True, max_length=256) @@ -660,7 +655,6 @@ class TimePeriodExceptionSource(models.Model): return self.ics_url -@python_2_unicode_compatible class TimePeriodException(models.Model): desk = models.ForeignKey(Desk, on_delete=models.CASCADE) source = models.ForeignKey(TimePeriodExceptionSource, on_delete=models.CASCADE, null=True)