The main apps that do this in a normal form can't render the same
behavior in an inline.
Many thanks.
--
Vinicius Massuchetto
http://vinicius.soylocoporti.org.br
Have anyone been able to implement an autocomplete input field in an
inline formset? If so, please provide some references.
The main apps that do this in a normal form can't render the same
behavior in an inline.
I don't think it's exactly what I'm looking for. I need to implement
ajax completion in some fields in an inline form, it would be
something like `django-autocomplete` and `django-ajax-select` can do
in usual forms.
Any help is appreciated.
Thanks.
records = models.Residents.objects.extra( where=[....], params=[...])
data = serializers.serialize('json', records, ensure_ascii=False,
fields=('fname','lname', 'pt'))
return HttpResponse(data)
After experimenting the "ensure_ascii=False" seems to get rid of the
Unicode prefix which is not used in my work.
which returns
[
{"pk": "77777", "model": "app.residents", "fields": {"lname": "Mouse ",
"pt": "0", "fname": "Minnie "}},
...]
I was surprised to see the subnode "fields" in the output. Perhaps I'm
just old school having does basic cgi with json and pretty much forced
the format.
1. However is the above the "best practice" or is there an option to
strip the meta data.
2. Does someone have a "best practice" jquery snippet to work with these
nested fields.
3. Would it be a cleaner solution to use a template to return some
"inner html" that ajax would use without any parsing logic.
I apologize for asking such basic questions, but I'm working solo and
this is my first serious HTML5 project after mostly using Flex and XML.
Thanks.
My code looks like this
records = models.Residents.objects.extra( where=[....], params=[...])
data = serializers.serialize('json', records, ensure_ascii=False,
fields=('fname','lname', 'pt'))
return HttpResponse(data)
After experimenting the "ensure_ascii=False" seems to get rid of the
Unicode prefix which is not used in my work.
which returns
[
{"pk": "77777", "model": "app.residents", "fields": {"lname": "Mouse ",
"pt": "0", "fname": "Minnie "}},
...]
I was surprised to see the subnode "fields" in the output. Perhaps I'm
just old school having does basic cgi with json and pretty much forced
the format.
1. However is the above the "best practice" or is there an option to
strip the meta data.