Opened 17 years ago

Closed 17 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: no UI/UX: no

Description

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 by anonymous, 17 years ago

Resolution: duplicate
Status: newclosed

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