﻿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
9727	models.CharField(max_length should be maxlength.  no underscore.	coachjpg	nobody	"
in http://docs.djangoproject.com/en/dev/intro/tutorial01/#intro-tutorial01

models.CharField(max_length should be maxlength.  no underscore.

class Poll(models.Model):
    question = models.CharField(max_length=200)

Following the example on the web page yields the error below.  Removing the undescore from maxlength fixes this.

I presume this is a django version skew issue.  Perhaps the top of the doc might mention what django version supported?

As a django newbie using the latest debian stable, this was confusing.

-jpg

Traceback (most recent call last):
  File ""manage.py"", line 11, in ?
    execute_manager(settings)
  File ""/var/lib/python-support/python2.4/django/core/management.py"", line 1319, in execute_manager    execute_from_command_line(action_mapping, argv)
  File ""/var/lib/python-support/python2.4/django/core/management.py"", line 1277, in execute_from_command_line
    mod_list = [models.get_app(app_label) for app_label in args[1:]]
  File ""/var/lib/python-support/python2.4/django/db/models/loading.py"", line 40, in get_app
    mod = load_app(app_name)
  File ""/var/lib/python-support/python2.4/django/db/models/loading.py"", line 51, in load_app
    mod = __import__(app_name, '', '', ['models'])
  File ""/home/jpg/poll0/../poll0/polls/models.py"", line 3, in ?
    class Poll(models.Model):
  File ""/home/jpg/poll0/../poll0/polls/models.py"", line 4, in Poll
    question = models.CharField(max_length=200)
TypeError: __init__() got an unexpected keyword argument 'max_length'


jpg@T30:~/poll0$ dpkg -l | egrep ""(deb|python)""
ii  debconf                           1.5.11etch2                          Debian configuration management system
ii  debconf-i18n                      1.5.11etch2                          full internationalization support for debcon
ii  debian-archive-keyring            2007.07.31~etch1                     GnuPG archive keys of the Debian archive
ii  debianutils                       2.17                                 Miscellaneous utilities specific to Debian
ii  doc-debian                        3.1.5                                Debian Project documentation, Debian FAQ and
ii  gdebi                             0.1.6                                Simple tool to install deb files
ii  iptables                          1.3.6.0debian1-5                     administration tools for packet filtering an
ii  libapache2-mod-python             3.2.10-4                             Apache 2 module that embeds Python within th
ii  libcaca0                          0.99.beta11.debian-2                 colour ASCII art library
ii  libcdparanoia0                    3.10+debian~pre0-4                   audio extraction tool for sampling CDs (libr
ii  libcucul0                         0.99.beta11.debian-2                 low-level Unicode character drawing library
ii  libsdl1.2debian                   1.2.11-8                             Simple DirectMedia Layer
ii  libsdl1.2debian-alsa              1.2.11-8                             Simple DirectMedia Layer (with X11 and ALSA
ii  python                            2.4.4-2                              An interactive high-level object-oriented la
ii  python-apt                        0.6.19                               Python interface to libapt-pkg
ii  python-cairo                      1.2.0-1                              Python bindings for the Cairo vector graphic
ii  python-central                    0.5.12                               register and build utility for Python packag
ii  python-django                     0.95.1-1etch2                        A high-level Python Web framework
ii  python-foomatic                   0.7.7                                Python interface to the Foomatic printer dat
ii  python-glade2                     2.8.6-8                              GTK+ bindings: Glade support
ii  python-gmenu                      2.16.1-3                             an implementation of the freedesktop menu sp
ii  python-gnome2                     2.12.4-6                             Python bindings for the GNOME desktop enviro
ii  python-gnome2-desktop             2.14.0-3                             Python bindings for the GNOME desktop enviro
ii  python-gnome2-extras              2.14.3-1                             Python bindings for the GNOME desktop enviro
ii  python-gnupginterface             0.3.2-9                              Python interface to GnuPG (GPG)
ii  python-gtk2                       2.8.6-8                              Python bindings for the GTK+ widget set
ii  python-ipy                        0.52-2                               Python module for handling IPv4 and IPv6 add
ii  python-libxml2                    2.6.27.dfsg-6                        Python bindings for the GNOME XML library
ii  python-minimal                    2.4.4-2                              A minimal subset of the Python language (def
ii  python-newt                       0.52.2-10                            A NEWT module for Python
ii  python-numeric                    24.2-7                               Numerical (matrix-oriented) Mathematics for
ii  python-pyorbit                    2.0.1-5                              A Python language binding for the ORBit2 COR
ii  python-pysqlite2                  2.3.2-2                              python interface to SQLite 3
ii  python-qt3                        3.16-1.2                             Qt3 bindings for Python
ii  python-selinux                    1.32-3                               Python bindings to SELinux shared libraries
ii  python-semanage                   1.8-1                                Python bindings  for SELinux policy manipula
ii  python-sip4                       4.4.5-4                              Python/C++ bindings generator runtime librar
ii  python-support                    0.5.6                                automated rebuilding support for python modu
ii  python-uno                        2.0.4.dfsg.2-7etch6                  Python interface for OpenOffice.org
ii  python-vte                        0.12.2-5                             Python bindings for the VTE widget set
ii  python-xdg                        0.15-1.1                             A python library to access freedesktop.org s
ii  python2.4                         2.4.4-3+etch2                        An interactive high-level object-oriented la
ii  python2.4-minimal                 2.4.4-3+etch2                        A minimal subset of the Python language (ver
ii  ssl-cert                          1.0.14                               Simple debconf wrapper for openssl
ii  xresprobe                         0.4.23debian1                        X Resolution Probe



"		closed	Documentation	1.0		duplicate		jpg@…	Unreviewed	0	0	0	0	0	0
