Django

Code

Ticket #5259 (closed: duplicate)

Opened 3 years ago

Last modified 3 years ago

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

Reported by: sullivan@mathcom.com Assigned to: jacob
Milestone: Component: Documentation
Version: SVN Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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.

Attachments

Change History

08/25/07 22:50:31 changed by Matt McClanahan <cardinal@dodds.net>

  • status changed from new to closed.
  • needs_better_patch changed.
  • resolution set to duplicate.
  • needs_tests changed.
  • needs_docs changed.

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/

08/25/07 23:16:38 changed by ubernostrum

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


Add/Change #5259 (Tutorial part 1 correction: change 'max_length' to 'maxlength')




Change Properties
Action