U
    {®Þho  ã                   @   sD   d dl mZ d dlmZ d dlmZ d dlmZ G dd„ deƒZdS )é    )ÚList)Úescape©Úget_document_model)ÚLinkHandlerc                   @   sX   e Zd ZdZedd„ ƒZeeedœdd„ƒZ	ee
e e
e dœdd	„ƒZed
d„ ƒZdS )ÚDocumentLinkHandlerZdocumentc                   C   s   t ƒ S )Nr   © r   r   úl/var/www/dating/data/www/fatepal.com/env/lib/python3.8/site-packages/wagtail/documents/rich_text/__init__.pyÚ	get_model   s    zDocumentLinkHandler.get_model)ÚattrsÚreturnc                 C   s   |   |g¡d S )Nr   )Úexpand_db_attributes_many©Úclsr   r   r   r	   Úexpand_db_attributes   s    z(DocumentLinkHandler.expand_db_attributes)Ú
attrs_listr   c                 C   s   dd„ |   |¡D ƒS )Nc                 S   s"   g | ]}|rd t |jƒ nd‘qS )z<a href="%s">z<a>)r   Úurl)Ú.0Údocr   r   r	   Ú
<listcomp>   s   ÿzADocumentLinkHandler.expand_db_attributes_many.<locals>.<listcomp>)Zget_many)r   r   r   r   r	   r      s    þz-DocumentLinkHandler.expand_db_attributes_manyc                 c   s   |   ¡ |d ddfV  d S )NÚidÚ )r
   r   r   r   r	   Úextract_references   s    z&DocumentLinkHandler.extract_referencesN)Ú__name__Ú
__module__Ú__qualname__Ú
identifierÚstaticmethodr
   ÚclassmethodÚdictÚstrr   r   r   r   r   r   r   r	   r      s   
r   N)	Útypingr   Zdjango.utils.htmlr   Zwagtail.documentsr   Zwagtail.rich_textr   r   r   r   r   r	   Ú<module>   s   