#12235: MultiValueDictKeyError when editing Inline objects ------------------------------------------+--------------------------------- Reporter: br...@playfirst.com | Owner: nobody Status: new | Milestone: Component: Uncategorized | Version: 1.1 Resolution: | Keywords: Stage: Unreviewed | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | ------------------------------------------+--------------------------------- Comment (by bruce_s):
What do you mean by use preview? Here is the cut-and-paste output from django: {{{ Environment: Request Method: POST Request URL: http://localhost/admin/gamedata/gamedata/book/8016d938-e9e2 -11de-8ec3-00188b8e3ea8/ Django Version: 1.2 pre-alpha Python Version: 2.6.4 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', 'admin.django_evolution', 'admin.gamedata'] Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware') Traceback: File "/usr/lib64/python2.6/site-packages/django/core/handlers/base.py" in get_response 92. response = callback(request, *callback_args, **callback_kwargs) File "/usr/lib64/python2.6/site-packages/django/contrib/admin/options.py" in wrapper 226. return self.admin_site.admin_view(view)(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/django/utils/decorators.py" in __call__ 23. return self.decorator(self.func)(*args, **kwargs) File "/usr/lib64/python2.6/site-packages/django/views/decorators/cache.py" in _wrapped_view_func 70. response = view_func(request, *args, **kwargs) File "/usr/lib64/python2.6/site-packages/django/contrib/admin/sites.py" in inner 186. return view(request, *args, **kwargs) File "/usr/lib64/python2.6/site-packages/django/db/transaction.py" in _commit_on_success 240. res = func(*args, **kw) File "/usr/lib64/python2.6/site-packages/django/contrib/admin/options.py" in change_view 826. instance=new_object, prefix=prefix) File "/usr/lib64/python2.6/site-packages/django/forms/models.py" in __init__ 724. queryset=qs) File "/usr/lib64/python2.6/site-packages/django/forms/models.py" in __init__ 459. super(BaseModelFormSet, self).__init__(**defaults) File "/usr/lib64/python2.6/site-packages/django/forms/formsets.py" in __init__ 44. self._construct_forms() File "/usr/lib64/python2.6/site-packages/django/forms/formsets.py" in _construct_forms 88. self.forms.append(self._construct_form(i)) File "/usr/lib64/python2.6/site-packages/django/forms/models.py" in _construct_form 737. form = super(BaseInlineFormSet, self)._construct_form(i, **kwargs) File "/usr/lib64/python2.6/site-packages/django/forms/models.py" in _construct_form 475. pk = self.data[pk_key] File "/usr/lib64/python2.6/site-packages/django/utils/datastructures.py" in __getitem__ 203. raise MultiValueDictKeyError, "Key %r not found in %r" % (key, self) Exception Type: MultiValueDictKeyError at /gamedata/gamedata/book/8016d938-e9e2-11de-8ec3-00188b8e3ea8/ Exception Value: Key 'author_set-0-id' not found in <QueryDict: {u 'author_set-TOTAL_FORMS': [u'5'], u'author_set-0-book': [u'8016d938-e9e2 -11de-8ec3-00188b8e3ea8'], u'title': [u'test title'], u'author_set-0-name': [u'author1'], u'author_set-3-name': [u''], u'author_set-2-book': [u'8016d938-e9e2-11de-8ec3-00188b8e3ea8'], u'_addanother': [u'Save and add another'], u'author_set-INITIAL_FORMS': [u'2'], u'author_set-4-name': [u''], u'author_set-2-name': [u'asdasd'], u'author_set-3-book': [u'8016d938-e9e2-11de-8ec3-00188b8e3ea8'], u'author_set-1-book': [u'8016d938-e9e2-11de-8ec3-00188b8e3ea8'], u'author_set-4-book': [u'8016d938-e9e2-11de-8ec3-00188b8e3ea8'], u'author_set-1-name': [u'author2']}> }}} -- Ticket URL: <http://code.djangoproject.com/ticket/12235#comment:5> Django <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 django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.