﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
12920	max_length should be maxlength on my system	rocteur	nobody	"python manage.py validate
rocsite.polls: __init__() got an unexpected keyword argument 'max_length'

$:/opt/roccode/rocsite$ python manage.py validate
polls.poll: ""question"": CharFields require a ""maxlength"" attribute.
polls.choice: ""choice"": CharFields require a ""maxlength"" attribute.

class Poll(models.Model):
    #question = models.CharField(max_length=200)
    question = models.CharField(maxlength=200)
    pub_date = models.DateTimeField('date published')

class Choice(models.Model):
    poll = models.ForeignKey(Poll)
    #choice = models.CharField(max_length=200)
    choice = models.CharField(maxlength=200)
    votes = models.IntegerField()

$:/opt/roccode/rocsite$ python manage.py validate
0 errors found.
$:/opt/roccode/rocsite$ python manage.py sql polls
BEGIN;
CREATE TABLE `polls_poll` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `question` varchar(200) NOT NULL,
    `pub_date` datetime NOT NULL
);
CREATE TABLE `polls_choice` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `poll_id` integer NOT NULL REFERENCES `polls_poll` (`id`),
    `choice` varchar(200) NOT NULL,
    `votes` integer NOT NULL
);
COMMIT;

"		closed	Uncategorized	1.1		invalid			Unreviewed	0	0	0	0	0	0
