Opened 15 years ago

Closed 15 years ago

#10529 closed (invalid)

Generic Inline fails (unexpected keyword argument `prefix`)

Reported by: leitjohn Owned by: leitjohn
Component: Forms Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I got a type exception saying, "init() got an unexpected keyword argument 'prefix'"

I found out that it was caused by a GenericTabularInline, for when i commented it out the error went away. I'm running the latest SVN so i guess it's to be expected.

Don't all forms allow the "prefix" keyword?

I'll try to get a patch for it soon.

Change History (6)

comment:1 by Alex Gaynor, 15 years ago

http://code.djangoproject.com/browser/django/trunk/django/contrib/contenttypes/generic.py#L287 correctly accepts a prefix argument so I'm not sure what your problem might be. I'll leave this open if you can provide some more open.

comment:2 by leitjohn, 15 years ago

Resolution: invalid
Status: newclosed

This was my mistake, thanks for pointing that out to me.

comment:3 by Terran, 15 years ago

I am receiving the same error after upgrading to trunk...with inline forms.

Was there a solution you found, Leitjohn? What was the 'mistake' you fixed, please? perhaps it is the same in mine.

Thanks!

comment:4 by Terran, 15 years ago

Resolution: invalid
Status: closedreopened

I am receiving the same error after upgrading to trunk on Windows and on Unix...with inline forms.

Was there a solution found/proposed to this issue?

Thanks!

comment:5 by Terran, 15 years ago

admin.py -> http://dpaste.com/33493/

URL: localhost:8000/admin/tracker/action/34/

Traceback:

Environment:

Request Method: GET
Request URL: http://localhost:8000/admin/tracker/action/34/
Django Version: 1.1 beta 1
Python Version: 2.5.4
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.comments',
 'django.contrib.contenttypes',
 'django.contrib.markup',
 'django.contrib.sessions',
 'django.contrib.sites',
 'trackera.tracker',
 'trackera.common']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.middleware.doc.XViewMiddleware')


Traceback:
File "C:\Python25\Lib\site-packages\django\core\handlers\base.py" in get_response
  92.                 response = callback(request, *callback_args, **callback_kwargs)
File "C:\Python25\Lib\site-packages\django\contrib\admin\sites.py" in root
  480.                 return self.model_page(request, *url.split('/', 2))
File "C:\Python25\Lib\site-packages\django\views\decorators\cache.py" in _wrapped_view_func
  44.         response = view_func(request, *args, **kwargs)
File "C:\Python25\Lib\site-packages\django\contrib\admin\sites.py" in model_page
  499.         return admin_obj(request, rest_of_url)
File "C:\Python25\Lib\site-packages\django\contrib\admin\options.py" in __call__
  1092.             return self.change_view(request, unquote(url))
File "C:\Python25\Lib\site-packages\django\db\transaction.py" in _commit_on_success
  240.                 res = func(*args, **kw)
File "C:\Python25\Lib\site-packages\django\contrib\admin\options.py" in change_view
  844.                 formset = FormSet(instance=obj, prefix=prefix)

Exception Type: TypeError at /admin/tracker/action/34/
Exception Value: __init__() got an unexpected keyword argument 'prefix'

comment:6 by Alex Gaynor, 15 years ago

Resolution: invalid
Status: reopenedclosed

Your checkout is somehow incorrect, if you consult the source code in the repo it clearly accepts a preifx argument.

Note: See TracTickets for help on using tickets.
Back to Top