1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #22206 -- Passed models.TextField.max_length to forms.CharField.maxlength

This commit is contained in:
Chris Wilson
2014-03-04 14:12:13 +00:00
committed by Claude Paroz
parent ac699cdc17
commit 95c74b9d69
8 changed files with 37 additions and 8 deletions

View File

@@ -488,6 +488,10 @@ Forms
Each radio button or checkbox includes an ``id_for_label`` attribute to
output the element's ID.
* The ``<textarea>`` tags rendered by :class:`~django.forms.Textarea` now
include a ``maxlength`` attribute if the :class:`~django.db.models.TextField`
model field has a ``max_length``.
* :attr:`Field.choices<django.db.models.Field.choices>` now allows you to
customize the "empty choice" label by including a tuple with an empty string
or ``None`` for the key and the custom label as the value. The default blank