Opened 9 years ago

Closed 9 years ago

#5162 closed (duplicate)

error in code in documentation

Reported by: stephane.rufer@… Owned by: jacob
Component: Documentation Version: 0.96
Severity: Keywords: error, documentation
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


from django.db import models

class Poll(models.Model):

question = models.CharField(max_length=200)
pub_date = models.DateTimeField('date published')

class Choice(models.Model):

poll = models.ForeignKey(Poll)
choice = models.CharField(max_length=200)
votes = models.IntegerField()

"max_length" should be "maxlength"...or at least thats what worked for me (Windows XP SP2 and Django 0.96)

Change History (1)

comment:1 Changed 9 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

The docs are for the SVN version, not 0.96. maxlength was changed to max_length (backwards-compatible) in [5803]. See also ticket #2101. Duplicate of #5119, #5159.

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