django-autocomplete-light modelform ValidationError -
i have autocomplete fields in 2 diferent forms.
one forms.form , works ok.
other 1 modelform , doesn't work
if try with:
class facturaform(modelform): class meta: widgets = autocomplete_light.get_widgets_dict(factura) model = factura
throws:
validationerror @ /facturas/nuevo/1/
[u'type cannot validate [0]']
.... {{ form.as_table }} ....
if try with:
class facturaform(modelform): class meta: model = factura widgets = { 'cliente': autocomplete_light.choicewidget('clienteautocomplete'), }
throws:
validationerror @ /facturas/nuevo/1/
[u'clienteautocomplete cannot validate [0]']
and if try with:
class facturaform(modelform): cliente = autocomplete_light.genericmodelchoicefield( widget=autocomplete_light.choicewidget( autocomplete='clienteautocomplete', autocomplete_js_attributes={'minimum_characters': 0, })) class meta: model = factura
the autocomplete works fine , seems work well, if send form save throws:
valueerror @ /facturas/nuevo/1/
need more 1 value unpack
.... if form.is_valid(): ....
any idea might wrong?
thanks help
Comments
Post a Comment