Opened 15 years ago

Closed 15 years ago

#9876 closed (invalid)

Incorrect max_length specification

Reported by: dberger Owned by: nobody
Component: Documentation Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In tutorial 1, both development and v 0.96, the following code block is given.

from django.db import models

class Poll(models.Model):
    question = models.CharField(maxlength=200)
    pub_date = models.DateTimeField('date published')

class Choice(models.Model):
    poll = models.ForeignKey(Poll)
    choice = models.CharField(maxlength=200)
    votes = models.IntegerField()

I am using the latest non-development release, 1.0.2. The necessary propert is max_length instead of maxlength.

Change History (1)

comment:1 by Karen Tracey, 15 years ago

Resolution: invalid
Status: newclosed

You seem to be looking at the wrong docs. The current version is here:

http://docs.djangoproject.com/en/dev/intro/tutorial01/#id3

and it does say max_length.

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