#5259 closed (duplicate)
Tutorial part 1 correction: change 'max_length' to 'maxlength'
| Reported by: | 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 , 18 years ago
| Resolution: | → duplicate | 
|---|---|
| Status: | new → closed | 
comment:2 by , 18 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.
    
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/