viewflow.forms.
AjaxModelSelect
(*args, **kwargs)¶A widget for ModelChoiceField with ajax based autocomplete.
To get AJAX results, GET requests with the additional X-Requested-Content=Autocomplete http header are performed to the same url as the form view.
Expected response is json like:
{
suggestions: [
{ value: 'Chicago Blackhawks', data: { id: 1 } },
{ value: 'Chicago Bulls', data: { id: 2 } }
]
]
Example:
class AddressForm(forms.Form):
city = forms.ModelChoiceField(
queryset=models.City.objects.all(),
widget=AjaxModelSelect(lookups=['name__icontains'])
)
viewflow.forms.
TrixEditorWidget
(options=None, *args, **kwargs)¶A WYSIWYG editor widget.
See also
viewflow.forms.
DependentModelSelect
(*args, **kwargs)¶