Django

Code

Ticket #5162 (closed: duplicate)

Opened 1 year ago

Last modified 1 year ago

error in code in documentation

Reported by: stephane.rufer@bridgeco.net Assigned to: jacob
Milestone: Component: Documentation
Version: 0.96 Keywords: error, documentation
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

from django.db import models

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

"max_length" should be "maxlength"...or at least thats what worked for me (Windows XP SP2 and Django 0.96)

Attachments

Change History

08/15/07 07:05:50 changed by anonymous

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

The docs are for the SVN version, not 0.96. maxlength was changed to max_length (backwards-compatible) in [5803]. See also ticket #2101. Duplicate of #5119, #5159.


Add/Change #5162 (error in code in documentation)




Change Properties
Action