mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Refs #23919 -- Removed python_2_unicode_compatible decorator usage
This commit is contained in:
@@ -5,7 +5,7 @@ from django.forms.utils import flatatt, pretty_name
|
||||
from django.forms.widgets import Textarea, TextInput
|
||||
from django.utils import six
|
||||
from django.utils.deprecation import RemovedInDjango21Warning
|
||||
from django.utils.encoding import force_text, python_2_unicode_compatible
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.functional import cached_property
|
||||
from django.utils.html import conditional_escape, format_html, html_safe
|
||||
from django.utils.inspect import func_supports_parameter
|
||||
@@ -16,7 +16,6 @@ __all__ = ('BoundField',)
|
||||
|
||||
|
||||
@html_safe
|
||||
@python_2_unicode_compatible
|
||||
class BoundField(object):
|
||||
"A Field plus data"
|
||||
def __init__(self, form, field, name):
|
||||
@@ -253,7 +252,6 @@ class BoundField(object):
|
||||
|
||||
|
||||
@html_safe
|
||||
@python_2_unicode_compatible
|
||||
class BoundWidget(object):
|
||||
"""
|
||||
A container class used for iterating over widgets. This is useful for
|
||||
|
||||
@@ -13,7 +13,7 @@ from django.forms.fields import Field, FileField
|
||||
from django.forms.utils import ErrorDict, ErrorList, pretty_name # NOQA
|
||||
from django.forms.widgets import Media, MediaDefiningClass
|
||||
from django.utils import six
|
||||
from django.utils.encoding import force_text, python_2_unicode_compatible
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.functional import cached_property
|
||||
from django.utils.html import conditional_escape, html_safe
|
||||
from django.utils.safestring import mark_safe
|
||||
@@ -59,7 +59,6 @@ class DeclarativeFieldsMetaclass(MediaDefiningClass):
|
||||
|
||||
|
||||
@html_safe
|
||||
@python_2_unicode_compatible
|
||||
class BaseForm(object):
|
||||
# This is the main implementation of all the Form logic. Note that this
|
||||
# class is different than Form. See the comments by the Form class for more
|
||||
|
||||
@@ -4,7 +4,6 @@ from django.forms.fields import BooleanField, IntegerField
|
||||
from django.forms.utils import ErrorList
|
||||
from django.forms.widgets import HiddenInput
|
||||
from django.utils import six
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
from django.utils.functional import cached_property
|
||||
from django.utils.html import html_safe
|
||||
from django.utils.safestring import mark_safe
|
||||
@@ -46,7 +45,6 @@ class ManagementForm(Form):
|
||||
|
||||
|
||||
@html_safe
|
||||
@python_2_unicode_compatible
|
||||
class BaseFormSet(object):
|
||||
"""
|
||||
A collection of instances of the same Form class.
|
||||
|
||||
@@ -4,7 +4,7 @@ import sys
|
||||
from django.conf import settings
|
||||
from django.core.exceptions import ValidationError # backwards compatibility
|
||||
from django.utils import six, timezone
|
||||
from django.utils.encoding import force_text, python_2_unicode_compatible
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.html import escape, format_html, format_html_join, html_safe
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
@@ -48,7 +48,6 @@ def flatatt(attrs):
|
||||
|
||||
|
||||
@html_safe
|
||||
@python_2_unicode_compatible
|
||||
class ErrorDict(dict):
|
||||
"""
|
||||
A collection of errors that knows how to display itself in various formats.
|
||||
@@ -81,7 +80,6 @@ class ErrorDict(dict):
|
||||
|
||||
|
||||
@html_safe
|
||||
@python_2_unicode_compatible
|
||||
class ErrorList(UserList, list):
|
||||
"""
|
||||
A collection of errors that knows how to display itself in various formats.
|
||||
|
||||
@@ -13,9 +13,7 @@ from django.forms.utils import to_current_timezone
|
||||
from django.templatetags.static import static
|
||||
from django.utils import datetime_safe, formats, six
|
||||
from django.utils.dates import MONTHS
|
||||
from django.utils.encoding import (
|
||||
force_str, force_text, python_2_unicode_compatible,
|
||||
)
|
||||
from django.utils.encoding import force_str, force_text
|
||||
from django.utils.formats import get_format
|
||||
from django.utils.html import format_html, html_safe
|
||||
from django.utils.safestring import mark_safe
|
||||
@@ -38,7 +36,6 @@ MEDIA_TYPES = ('css', 'js')
|
||||
|
||||
|
||||
@html_safe
|
||||
@python_2_unicode_compatible
|
||||
class Media(object):
|
||||
def __init__(self, media=None, **kwargs):
|
||||
if media:
|
||||
|
||||
Reference in New Issue
Block a user