Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#5259 closed (duplicate)

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

Reported by: sullivan@… Owned by: jacob
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


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 Changed 9 years ago by Matt McClanahan <cardinal@…>

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

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

comment:2 Changed 9 years ago by ubernostrum

(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