Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#20543 closed Cleanup/optimization (fixed)

Possible typo in Django's documentation

Reported by: i.amber.jain@… Owned by: nobody
Component: Documentation Version: 1.5
Severity: Normal Keywords: max_length, db, model
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

https://docs.djangoproject.com/en/1.5/topics/db/models/#field-options lists following example (under "choices" sub-section):

from django.db import models

class Person(models.Model):
    SHIRT_SIZES = (
        ('S', 'Small'),
        ('M', 'Medium'),
        ('L', 'Large'),
    )
    name = models.CharField(max_length=60)
    shirt_size = models.CharField(max_length=2, choices=SHIRT_SIZES)

Why does the example below has max_length=2 instead of max_length=1 ? Is this because of some DB/vendor issue (I could not find anything about this at https://docs.djangoproject.com/en/1.5/ref/databases/)?
Someone on #django (freenode) suggested this could be a typo. So, I thought of reporting it here.

Thanks!

Change History (2)

comment:1 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: newclosed

In f315693304865162d0b1bb8f913e9c5f14fb351e:

Fixed #20543 - Typo in db model fields docs.

Thanks i.amber.jain@ for the report.

comment:2 by Tim Graham <timograham@…>, 11 years ago

In 56192d21d5fde1b4085bb7a175e450f1e94ee962:

[1.5.x] Fixed #20543 - Typo in db model fields docs.

Thanks i.amber.jain@ for the report.

Backport of f315693304 from master

Note: See TracTickets for help on using tickets.
Back to Top