
    Nwg
                        d dl mZ d dlmZmZ d dlmZ d dlmZ d dl	m
Z
 ddlmZmZmZmZmZmZmZmZmZmZmZmZ  G d d	e      Z G d
 de      Z G d de      Z G d de      Z G d de      Z G d de      Zej<                  j?                  ee       ej<                  j?                  ee       ej<                  j?                  ee       ej<                  j?                  ee       ej<                  j?                  ee       ej<                  j?                  e
e       ej<                  j?                  ee       ej<                  j?                  ee       ej<                  j?                  ee       ej<                  j?                  ee       ej<                  j?                  ee       ej<                  j?                  ee       y)    )admin)
SafeString	mark_safe)SimpleHistoryAdmin)HistoricalRecordContextHelper)"ExternalModelWithCustomUserIdField   )BookChoiceConcreteExternalDocumentEmployee	FileModelPaperPersonPlacePlanetPollPollWithManyToManyc                       e Zd ZddZddZy)PersonAdminNc                      yNF selfrequestobjs      Q/var/www/horilla/myenv/lib/python3.12/site-packages/simple_history/tests/admin.pyhas_change_permissionz!PersonAdmin.has_change_permission           c                      yr   r   r   s      r   has_view_permissionzPersonAdmin.has_view_permission   r!   r"   N)__name__
__module____qualname__r    r$   r   r"   r   r   r      s    r"   r   c                       e Zd ZdgZy)ChoiceAdminvotesN)r&   r'   r(   history_list_displayr   r"   r   r*   r*       s
    #9r"   r*   c                       e Zd Zd ZddgZy)FileModelAdminc                      yNtest_method_valuer   r   r   s     r   test_methodzFileModelAdmin.test_method%       "r"   titler3   Nr&   r'   r(   r3   r,   r   r"   r   r.   r.   $       # $]3r"   r.   c                       e Zd Zd ZddgZy)PlanetAdminc                      yr0   r   r2   s     r   r3   zPlanetAdmin.test_method,   r4   r"   r5   r3   Nr6   r   r"   r   r9   r9   +   r7   r"   r9   c                   8     e Zd Z fdZededefd       Z xZS ))HistoricalPollWithManyToManyContextHelperc                     t         |   ||      }|j                  dk(  rSt        |t              sJ t        d |D              sJ t        |d       }t	        t        | j                  |            }|S )Nplacesc              3   <   K   | ]  }t        |t                y wr%   )
isinstancer   ).0places     r   	<genexpr>zWHistoricalPollWithManyToManyContextHelper.prepare_delta_change_value.<locals>.<genexpr>7   s     KEz%/Ks   c                     | j                   S r%   )namerB   s    r   <lambda>zVHistoricalPollWithManyToManyContextHelper.prepare_delta_change_value.<locals>.<lambda>9   s
    UZZ r"   )key)	superprepare_delta_change_valuefieldr@   listallsortedmapplace_display)r   changevaluedisplay_valuer>   	__class__s        r   rJ   zDHistoricalPollWithManyToManyContextHelper.prepare_delta_change_value3   sn    :65I<<8#mT222K]KKKKM/GHF T%7%7!@AMr"   rB   returnc                 4    t        d| j                   d      S )Nz<b>z</b>)r   rE   rF   s    r   rP   z7HistoricalPollWithManyToManyContextHelper.place_display=   s    3uzzl$/00r"   )	r&   r'   r(   rJ   staticmethodr   r   rP   __classcell__)rT   s   @r   r<   r<   2   s*     1U 1z 1 1r"   r<   c                       e Zd Zd Zy)PollWithManyToManyAdminc                 .    t        | j                  |      S r%   )r<   model)r   r   historical_records      r   $get_historical_record_context_helperz<PollWithManyToManyAdmin.get_historical_record_context_helperC   s    8EVWWr"   N)r&   r'   r(   r^   r   r"   r   rZ   rZ   B   s    Xr"   rZ   N) django.contribr   django.utils.safestringr   r   simple_history.adminr   simple_history.template_utilsr   $simple_history.tests.external.modelsr   modelsr
   r   r   r   r   r   r   r   r   r   r   r   r   r*   r.   r9   r<   rZ   siteregisterr   r"   r   <module>rg      su     9 3 G S    $ %$ %4' 44$ 410M 1 X0 X
 

  D, - 

  FK ( 

  $&8 9 

  H0 1 

  H0 1 

  68J K 

  I~ . 

  E- . 

  FK ( 

  FK ( 

  D, - 

  &(? @r"   