[Django] #23683: CharField's max_length is Incorrectly Listed as Optional in Documentation

2 views
Skip to first unread message

Django

unread,
Oct 18, 2014, 3:58:51 PM10/18/14
to django-...@googlegroups.com
#23683: CharField's max_length is Incorrectly Listed as Optional in Documentation
-------------------------------+--------------------
Reporter: machineghost | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
The documentation (for all currently documented versions of Django) on the
CharField class states that it:

{{{
Has two optional arguments for validation:

max_length
min_length
}}}

However, if you actually try to create a CharField without a max_length
Django will complain:

{{{
"some_field": CharFields require a "max_length" attribute that is a
positive integer.
}}}


So, it seems that the max_length arg is required by Django, but listed as
optional in the documentation, and thus it appears the documentation
requires an update.

--
Ticket URL: <https://code.djangoproject.com/ticket/23683>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 18, 2014, 4:16:18 PM10/18/14
to django-...@googlegroups.com
#23683: CharField's max_length is Incorrectly Listed as Optional in Documentation
-------------------------------+--------------------------------------
Reporter: machineghost | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: 1.7
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by claudep):

* status: new => closed
* needs_docs: => 0
* resolution: => invalid
* needs_tests: => 0
* needs_better_patch: => 0


Comment:

You are mixing the form field documentation with the model field
documentation:
https://docs.djangoproject.com/en/dev/ref/forms/fields/#charfield
https://docs.djangoproject.com/en/dev/ref/models/fields/#charfield

--
Ticket URL: <https://code.djangoproject.com/ticket/23683#comment:1>

Reply all
Reply to author
Forward
0 new messages