Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#5259 closed (duplicate)

Tutorial part 1 correction: change 'max_length' to 'maxlength'

Reported by: sullivan@… Owned by: Jacob
Component: Documentation Version: dev
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

At http://www.djangoproject.com/documentation/tutorial01/
the defs for Poll and Choice are:

    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()

In them I had to change 'max_length' to 'maxlength'
to get them to work.

Change History (2)

comment:1 by Matt McClanahan <cardinal@…>, 17 years ago

Resolution: duplicate
Status: newclosed

The argument was recently changed to max_length in the trunk version. See #2101 and [5803].

If you are using Django 0.96, the documentation you should use is http://www.djangoproject.com/documentation/0.96/

comment:2 by James Bennett, 17 years ago

(and see also the note in the tutorial text telling you what to do if you get this error)

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