Opened 6 years ago

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

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 Changed 6 years ago by kmtracey

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

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