Typeerror:__ init __()得到了一个意外的关键字参数'max_length'

Ore*_*sym 6 django python-3.3

  1. Python版本3.3
  2. Django版本1.5.2

Settings.py - 管理员已启用,时区已更改

urls.py - 已启用管理员.

__init__.py -是空的

我创建了一个文件"models.py"

from django.db import models
from django.contrib import admin


# Create your models here.
class Post(models.Model):
    title = models.CharField(max_lenght=128, verbose_name=u"Title")
    desc = models.TextField(verbose_name=u"News Text")
    datetimestamp = models.DateTimeField(auto_now=True, verbose_name=u"Date,/Time")    
Run Code Online (Sandbox Code Playgroud)

当我尝试时 manage.py syncdb.

我收到了一个错误 typeerror :__init__() got an unexpected keyword argument ' max_length '

我是Python\Django的新手.用Google搜索了2天而没有回答我发现的答案是 - max_lenght而不是maxlenght版本0.96的类型

模型 - >模型

一些旧的Django与新的Python等...

问题出在models.py中.请求你的帮助.谢谢

Max*_*ant 10

你拼错max_length(你有反转g和t),这使得命名的参数max_lenght为Python未知.