Code

Opened 5 years ago

Closed 5 years ago

#10529 closed (invalid)

Generic Inline fails (unexpected keyword argument `prefix`)

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

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.

Attachments (0)

Change History (6)

comment:1 Changed 5 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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 Changed 5 years ago by leitjohn

  • Resolution set to invalid
  • Status changed from new to closed

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

comment:3 Changed 5 years ago by earthman

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 Changed 5 years ago by earthman

  • Resolution invalid deleted
  • Status changed from closed to reopened

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 Changed 5 years ago by earthman

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 Changed 5 years ago by Alex

  • Resolution set to invalid
  • Status changed from reopened to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.