class AutocompleteJsonView(BaseListView):
Method | get |
No summary |
Method | get_paginator |
Use the ModelAdmin's paginator. |
Method | get_queryset |
Return queryset based on ModelAdmin.get_search_results(). |
Method | has_perm |
Check if user has permission to access the related model. |
Method | process_request |
Validate request integrity, extract and return request parameters. |
Method | serialize_result |
Convert the provided model object to a dictionary that is added to the results list. |
Class Variable | admin_site |
Undocumented |
Class Variable | paginate_by |
Undocumented |
Instance Variable | model_admin |
Undocumented |
Instance Variable | object_list |
Undocumented |
Instance Variable | source_field |
Undocumented |
Instance Variable | term |
Undocumented |
Inherited from MultipleObjectMixin
(via BaseListView
):
Method | get_allow_empty |
Return True if the view should display empty lists and False if a 404 should be raised instead. |
Method | get_context_data |
Get the context for this view. |
Method | get_context_object_name |
Get the name of the item to be used in the context. |
Method | get_ordering |
Return the field or fields to use for ordering the queryset. |
Method | get_paginate_by |
Get the number of items to paginate by, or None for no pagination. |
Method | get_paginate_orphans |
Return the maximum number of orphans extend the last page by when paginating. |
Method | paginate_queryset |
Paginate the queryset, if needed. |
Class Variable | allow_empty |
Undocumented |
Class Variable | context_object_name |
Undocumented |
Class Variable | model |
Undocumented |
Class Variable | ordering |
Undocumented |
Class Variable | page_kwarg |
Undocumented |
Class Variable | paginate_orphans |
Undocumented |
Class Variable | queryset |
Undocumented |
Inherited from ContextMixin
(via BaseListView
, MultipleObjectMixin
):
Class Variable | extra_context |
Undocumented |
Return a JsonResponse with search results as defined in serialize_result(), by default: {
results: [{id: "123" text: "foo"}], pagination: {more: true}
}
Validate request integrity, extract and return request parameters.
Since the subsequent view permission check requires the target model admin, which is determined here, raise PermissionDenied if the requested app, model or field are malformed.
Raise Http404 if the target model admin is not configured properly with search_fields.