Code

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#5905 closed (invalid)

Typo in WritingFirstApp/Part1/CreatingModels, polls/models.py should read maxlength not max_length

Reported by: riazrizvi@… Owned by: nobody
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:

Description

using Django 0.96.1 on WindowsXP/Python24/Mysql50, in tutorial WritingFirstApp/PartOne/CreatingModels, I get an error if I follow these instructions

These concepts are represented by simple Python classes. Edit the polls/models.py file so it looks like this:
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()

I get an error when I run

 python manage.py sql polls

unless I remove the underscore from the CharFields of Poll and Choice models to read

... .CharField(maxlength=200)

Attachments (0)

Change History (2)

comment:1 Changed 6 years ago by anonymous

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

comment:2 Changed 6 years ago by Alex

Those instructions are for trunk, which does use the underscore, there are seperate docs for .96.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.