#12920: max_length should be maxlength on my system
---------------------------+------------------------------------------------
Reporter: rocteur | Owner: nobody
Status: new | Milestone:
Component: Uncategorized | Version: 1.1
Keywords: | Stage: Unreviewed
Has_patch: 0 |
---------------------------+------------------------------------------------
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;
--
Ticket URL: <http://code.djangoproject.com/ticket/12920>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.