Code

Opened 7 years ago

Closed 7 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:

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)

Attachments (0)

Change History (1)

comment:1 Changed 7 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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.