list_editable raising a MultiValueDictKeyError

96 views
Skip to first unread message

Nick

unread,
Feb 7, 2012, 3:10:34 PM2/7/12
to Django users
Whenever I use list_editable inside of the django admin attempting to
save the data results in

Exception Type: MultiValueDictKeyError
Exception Value: "Key 'form-0-id' not found in <QueryDict: {u'form-66-
newID': [u''], etc. etc. >

Whenever I create custom forms I simply add in the form-0 inputs as a
hidden field. How do I work around this in the admin?

Luigi Panzeri

unread,
Feb 11, 2012, 10:49:42 AM2/11/12
to Django users
I added the missing form inputs as follows:

if ($('.editable').length > 0) {
$('.action-select').each(function(i, el) {
var item_id = $(el).val();
$('form').append("<input type='hidden' name='form-" + i + "-id'
value='" + item_id + "'/>");
});
}

It seems a bug
Reply all
Reply to author
Forward
0 new messages