#20543 closed Cleanup/optimization (fixed)
Possible typo in Django's documentation
| Reported by: | 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!
Note:
See TracTickets
for help on using tickets.
In f315693304865162d0b1bb8f913e9c5f14fb351e: