| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/django/contrib/admin/views/__pycache__/ |
Upload File : |
�
�|�e0 � �Z � d dl mZ d dlmZmZ d dlmZmZ d dlm Z G d� de � � Z
dS )� )�apps)�FieldDoesNotExist�PermissionDenied)�Http404�JsonResponse)�BaseListViewc �: � e Zd ZdZdZdZd� Zd� Zd� Zd� Z d d�Z
dS )
�AutocompleteJsonViewz3Handle AutocompleteWidget's AJAX requests for data.� Nc �d �� | � |� � \ | _ | _ | _ �| � |� � st
�| � � � | _ | � � � }t �fd�|d D � � d|d �
� � id�� � S )z�
Return a JsonResponse with search results of the form:
{
results: [{id: "123" text: "foo"}],
pagination: {more: true}
}
c �j �� g | ]/}t t |�� � � � t |� � d ���0S ))�id�text)�str�getattr)�.0�obj�
to_field_names ��I/usr/lib/python3/dist-packages/django/contrib/admin/views/autocomplete.py�
<listcomp>z,AutocompleteJsonView.get.<locals>.<listcomp> sI �� � � � �� �7�3�
�6�6�7�7��S���J�J�� � � �object_list�more�page_obj)�results�
pagination)�process_request�term�model_admin�source_field�has_permr �get_querysetr �get_context_datar �has_next)�self�request�args�kwargs�contextr s @r �getzAutocompleteJsonView.get s� �� � IM�H\�H\�]d�He�He�E�� �4�#�T�%6�
��}�}�W�%�%� #�"�"��,�,�.�.����'�'�)�)���� � � �"�=�1�� � � "�7�:�#6�#?�#?�#A�#A�B�
�
� � � r c �8 � | j j | j g|�R i |��S )zUse the ModelAdmin's paginator.)r �
get_paginatorr&