I'm going to guess you have been following along with the 
http://www.djangobook.com/
site. It was great in the day but *do not use that* now-a-days as it
covers 0.96. There have been significant changes, one of which is the
maxlength to max_length on CharFields. Stick with the particular
version you are using from docs.djangoproject.com. Even changes from
1.1 to 1.2 are significant enough that reading the wrong version's
docs can give you headaches.

On 21 July, 18:05, Subhranath Chunder <subhran...@gmail.com> wrote:
> Must be using very old docs:
>
> Use these instead:http://docs.djangoproject.com/en/dev/
>
> Thanks,
> Subhranath Chunder.
>
>
>
> On Wed, Jul 21, 2010 at 8:47 PM, n3ph <n...@terminal21.de> wrote:
> >  Another one who's confused about all the deep API-Changes in Django :-(
>
> > But reading the doc's is very helpful to preventing you from thees traps...
>
> > Am 21.07.2010 17:04, schrieb euan.godd...@googlemail.com:
>
> >  The traceback tells you exactly what the problem is. The correct kwarg
> >> is max_length
>
> >> On Jul 21, 2:00 pm, balu<vab...@gmail.com>  wrote:
>
> >>> Respected sir
>
> >>> This is balu studying B.Tech third year. I started working on django
> >>> in order to create dynamic website. My Python version is 2.6.5. While
> >>> I'm using creating a app the following error has displayed in the
> >>> command line.
>
> >>> /
>
> >>> ***************************************************************************
> >>>  **********/
>
> >>> Microsoft Windows XP [Version 5.1.2600]
> >>> (C) Copyright 1985-2001 Microsoft Corp.
>
> >>> C:\Documents and Settings\Administrator>cd c:\
>
> >>> C:\>cd projects
>
> >>> C:\projects>manage.py startapp books
> >>> 'manage.py' is not recognized as an internal or external command,
> >>> operable program or batch file.
>
> >>> C:\projects>cd mysite
>
> >>> C:\projects\mysite>python manage.py startapp books
>
> >>> C:\projects\mysite>cd books
>
> >>> C:\projects\mysite\books>div
> >>> 'div' is not recognized as an internal or external command,
> >>> operable program or batch file.
>
> >>> C:\projects\mysite\books>dir
> >>>  Volume in drive C has no label.
> >>>  Volume Serial Number is 3474-4CF2
>
> >>>  Directory of C:\projects\mysite\books
>
> >>> 07/21/2010  04:59 PM<DIR>            .
> >>> 07/21/2010  04:59 PM<DIR>            ..
> >>> 07/21/2010  04:59 PM                60 models.py
> >>> 07/21/2010  04:59 PM               537 tests.py
> >>> 07/21/2010  04:59 PM                27 views.py
> >>> 07/21/2010  04:59 PM                 0 __init__.py
> >>>                4 File(s)            624 bytes
> >>>                2 Dir(s)  27,813,937,152 bytes free
>
> >>> C:\projects\mysite\books>cd C:\projects\mysite
>
> >>> C:\projects\mysite>python manage.py validate
> >>> Traceback (most recent call last):
> >>>   File "manage.py", line 11, in<module>
> >>>     execute_manager(settings)
> >>>   File "C:\python26\lib\site-packages\django\core\management
> >>> \__init__.py", line
> >>> 438, in execute_manager
> >>>     utility.execute()
> >>>   File "C:\python26\lib\site-packages\django\core\management
> >>> \__init__.py", line
> >>> 379, in execute
> >>>     self.fetch_command(subcommand).run_from_argv(self.argv)
> >>>   File "C:\python26\lib\site-packages\django\core\management\base.py",
> >>> line 191,
> >>>  in run_from_argv
> >>>     self.execute(*args, **options.__dict__)
> >>>   File "C:\python26\lib\site-packages\django\core\management\base.py",
> >>> line 218,
> >>>  in execute
> >>>     output = self.handle(*args, **options)
> >>>   File "C:\python26\lib\site-packages\django\core\management\base.py",
> >>> line 347,
> >>>  in handle
> >>>     return self.handle_noargs(**options)
> >>>   File "C:\python26\lib\site-packages\django\core\management\commands
> >>> \validate.p
> >>> y", line 9, in handle_noargs
> >>>     self.validate(display_num_errors=True)
> >>>   File "C:\python26\lib\site-packages\django\core\management\base.py",
> >>> line 245,
> >>>  in validate
> >>>     num_errors = get_validation_errors(s, app)
> >>>   File "C:\python26\lib\site-packages\django\core\management
> >>> \validation.py", lin
> >>> e 28, in get_validation_errors
> >>>     for (app_name, error) in get_app_errors().items():
> >>>   File "C:\python26\lib\site-packages\django\db\models\loading.py",
> >>> line 146, in
> >>>  get_app_errors
> >>>     self._populate()
> >>>   File "C:\python26\lib\site-packages\django\db\models\loading.py",
> >>> line 61, in
> >>> _populate
> >>>     self.load_app(app_name, True)
> >>>   File "C:\python26\lib\site-packages\django\db\models\loading.py",
> >>> line 78, in
> >>> load_app
> >>>     models = import_module('.models', app_name)
> >>>   File "C:\python26\lib\site-packages\django\utils\importlib.py", line
> >>> 35, in im
> >>> port_module
> >>>     __import__(name)
> >>>   File "C:\projects\mysite\..\mysite\books\models.py", line 5, in
> >>> <module>
> >>>     class Publisher(models.Model):
> >>>   File "C:\projects\mysite\..\mysite\books\models.py", line 6, in
> >>> Publisher
> >>>     name = models.CharField(maxlength=30)
> >>>   File "C:\python26\lib\site-packages\django\db\models\fields
> >>> \__init__.py", line
> >>>  542, in __init__
> >>>     super(CharField, self).__init__(*args, **kwargs)
> >>> TypeError: __init__() got an unexpected keyword argument 'maxlength'
>
> >>> C:\projects\mysite>
>
> >>> /
>
> >>> ***************************************************************************
> >>>  ***********/
>
> >>> I'm very thankful to you if anyone could able to direct me to solve
> >>> this error.
>
> >>> Thanking you
> >>> balu.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@google 
> > groups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to