misc: remove usage of @python_2_unicode_compatible (#38665)

This commit is contained in:
Frédéric Péters 2019-12-20 13:08:04 +01:00
parent e7a4c7e671
commit c33860bb0b
1 changed files with 1 additions and 7 deletions

View File

@ -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)