#5144: "got an unexpected keyword argument 'max_length'"
------------------------------------+---------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: adrian
Status: new | Component: Contrib apps
Version: SVN | Keywords: admin
Stage: Unreviewed | Has_patch: 0
------------------------------------+---------------------------------------
I'm using revision 5878 to start a new project. I have this in my model:
first_name=models.CharField(max_length=100)
last_name=models.CharField(max_length=50)
And I have django.contrib.admin enabled. When I use the Admin App to add
a new object of that class, I get the following error::
Traceback (most recent call last):
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
site-packages/django/core/handlers/base.py" in get_response
77. response = callback(request, *callback_args, **callback_kwargs)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
site-packages/django/contrib/admin/views/decorators.py" in _checklogin
55. return view_func(request, *args, **kwargs)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
site-packages/django/views/decorators/cache.py" in _wrapped_view_func
39. response = view_func(request, *args, **kwargs)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
site-packages/django/contrib/admin/views/main.py" in add_stage
250. manipulator = model.AddManipulator()
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
site-packages/django/db/models/manipulators.py" in __init__
71. self.fields.extend(f.get_manipulator_fields(self.opts, self,
self.change))
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
site-packages/django/db/models/fields/__init__.py" in
get_manipulator_fields
317. return [man(field_name=field_names[i], **params) for i, man in
enumerate(field_objs)]
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
site-packages/django/utils/maxlength.py" in inner
48. func(self, *args, **kwargs)
TypeError at /admin/members/people/add/
__init__() got an unexpected keyword argument 'max_length'
If I comment out lines 46-67 in django/utils/maxlength.py and change my
CharFields records to "maxlength" I can add a object but not view it. But
changing that file seems wrong.
--
Ticket URL: <http://code.djangoproject.com/ticket/5144>
Django Code <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
-~----------~----~----~----~------~----~------~--~---