
    OjX                         S SK r S SKJr  S SKJr  S SKJr  S SKJr  S SK	J
r
  \ R                  " S5      r " S S	\R                  5      rg)
    N)receiver)page_published)ContentType)models)process_outgoing_webmentionsdjangoc                   R    \ rS rSr " S S5      rS\4S jr\" \5      S 5       r	Sr
g)	MentionableMixin   c                       \ rS rSrSrSrg)MentionableMixin.Meta   T N)__name__
__module____qualname____firstlineno__abstract__static_attributes__r       /opt/fre/webmention/mixins.pyMetar      s    r   r   returnc                 .    [         R                  S5        g)a  
Return all the text that should be searched when looking for
outgoing Webmentions. Any URLs found in this text will be
checked for webmention support.

Typically this will just be the main text of your model but
you may also want to include content from any other text fields
such as a summary or abstract.

Example:
    def all_text(self) -> str:
        return f'{self.introduction} {self.main_content}'
zpThis model extends WebMentionableMixin but has not implemented all_text() so outgoing webmentions will not work! )logwarning)selfs    r   all_textMentionableMixin.all_text   s     		 r   c                     US   n[         R                  S5        [        UR                  UR	                  5       5        g )Ninstancez5Outgoing webmention processing task added to queue...)r   infor   full_urlr   )senderkwargspages      r   do_stuff_on_page_published+MentionableMixin.do_stuff_on_page_published%   s-    j!HI$T]]DMMODr   r   N)r   r   r   r   r   strr   r   r   r(   r   r   r   r   r
   r
      s3     # ( nE Er   r
   )loggingdjango.dispatchr   wagtail.signalsr   "django.contrib.contenttypes.modelsr   	django.dbr   webmention.outgoing_webmentionsr   	getLoggerr   Modelr
   r   r   r   <module>r3      s;     $ * :  H !Ev|| Er   