trivial: remove usage of obsolete python_2_unicode_compatible (#64292)
This commit is contained in:
parent
76904d5e6c
commit
4ab6c803f2
|
@ -38,7 +38,7 @@ from django.forms import models as model_forms
|
|||
from django.template.loader import render_to_string
|
||||
from django.urls import reverse
|
||||
from django.utils import dateparse, timezone
|
||||
from django.utils.encoding import force_bytes, python_2_unicode_compatible
|
||||
from django.utils.encoding import force_bytes
|
||||
from django.utils.formats import localize
|
||||
from django.utils.timezone import make_aware, now, utc
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
@ -140,7 +140,6 @@ class PaymentBackendManager(models.Manager):
|
|||
return self.get(slug=slug)
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class PaymentBackend(models.Model):
|
||||
label = models.CharField(verbose_name=_('Label'), max_length=64)
|
||||
slug = models.SlugField(
|
||||
|
@ -273,7 +272,6 @@ class PaymentBackend(models.Model):
|
|||
return reverse('lingo-callback-payment-backend', kwargs={'payment_backend_pk': self.slug})
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Regie(models.Model):
|
||||
label = models.CharField(verbose_name=_('Label'), max_length=64)
|
||||
slug = models.SlugField(
|
||||
|
|
|
@ -24,7 +24,6 @@ from django.core import serializers, validators
|
|||
from django.db import models
|
||||
from django.db.models import OuterRef, Subquery
|
||||
from django.urls import reverse
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
from django.utils.html import escape
|
||||
from django.utils.text import slugify
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
@ -100,7 +99,6 @@ class MapLayerManager(models.Manager):
|
|||
return self.get(slug=slug)
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class MapLayer(models.Model):
|
||||
objects = MapLayerManager()
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ from django.conf import settings
|
|||
from django.db import models
|
||||
from django.db.models import Q
|
||||
from django.db.models.query import QuerySet
|
||||
from django.utils.encoding import force_text, python_2_unicode_compatible
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.timezone import now, timedelta
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
|
@ -62,7 +62,6 @@ class NotificationQuerySet(QuerySet):
|
|||
self.update(end_timestamp=past_end_timestamp, acked=True)
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Notification(models.Model):
|
||||
ID_RE = r'^[\w-]+:[\w-]+$'
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ from django.forms.widgets import MediaDefiningClass
|
|||
from django.template import RequestContext, Template, TemplateDoesNotExist, TemplateSyntaxError, engines
|
||||
from django.test.client import RequestFactory
|
||||
from django.utils import timezone
|
||||
from django.utils.encoding import force_text, python_2_unicode_compatible, smart_bytes
|
||||
from django.utils.encoding import force_text, smart_bytes
|
||||
from django.utils.html import strip_tags
|
||||
from django.utils.safestring import mark_safe
|
||||
from django.utils.text import slugify
|
||||
|
@ -170,7 +170,6 @@ class PageManager(models.Manager):
|
|||
return queryset.filter(snapshot__isnull=True)
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Page(models.Model):
|
||||
objects = PageManager()
|
||||
snapshots = PageManager(snapshots=True)
|
||||
|
@ -779,7 +778,6 @@ class CellMeta(MediaDefiningClass, ModelBase):
|
|||
pass
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class CellBase(models.Model, metaclass=CellMeta):
|
||||
# noqa pylint: disable=too-many-public-methods
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ from django.conf import settings
|
|||
from django.contrib.auth.models import Group
|
||||
from django.core.serializers.base import DeserializationError
|
||||
from django.db import transaction
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from combo.apps.assets.models import Asset
|
||||
|
@ -39,7 +38,6 @@ class ImportSiteError(Exception):
|
|||
pass
|
||||
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class MissingGroups(ImportSiteError):
|
||||
def __init__(self, names):
|
||||
self.names = names
|
||||
|
|
Loading…
Reference in New Issue