summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorVytis Banaitis <vytis.banaitis@gmail.com>2017-01-20 23:04:05 +0200
committerTim Graham <timograham@gmail.com>2017-01-26 08:19:27 -0500
commitd1bab24e0144d14513a1411503c95ececb425188 (patch)
tree187452bf7b66a9600abc47570ccae22e6d539ede /django/forms
parent888c1e9bfe49135d049cbdcbbb0f2e97a1a0a1f5 (diff)
Refs #23919, #27778 -- Removed obsolete mentions of unicode.
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/fields.py4
-rw-r--r--django/forms/widgets.py4
2 files changed, 3 insertions, 5 deletions
diff --git a/django/forms/fields.py b/django/forms/fields.py
index e0c4edad52..2994ece1ce 100644
--- a/django/forms/fields.py
+++ b/django/forms/fields.py
@@ -229,7 +229,7 @@ class CharField(Field):
self.validators.append(validators.MaxLengthValidator(int(max_length)))
def to_python(self, value):
- "Returns a Unicode object."
+ "Returns a string."
if value in self.empty_values:
return self.empty_value
value = force_text(value)
@@ -799,7 +799,7 @@ class ChoiceField(Field):
choices = property(_get_choices, _set_choices)
def to_python(self, value):
- "Returns a Unicode object."
+ "Return a string."
if value in self.empty_values:
return ''
return force_text(value)
diff --git a/django/forms/widgets.py b/django/forms/widgets.py
index 4317a0fc39..eef90a3bd4 100644
--- a/django/forms/widgets.py
+++ b/django/forms/widgets.py
@@ -200,9 +200,7 @@ class Widget(metaclass=MediaDefiningClass):
return context
def render(self, name, value, attrs=None, renderer=None):
- """
- Returns this Widget rendered as HTML, as a Unicode string.
- """
+ """Render the widget as an HTML string."""
context = self.get_context(name, value, attrs)
return self._render(self.template_name, context, renderer)