Ë
    B…îh
  ã                   ó2   — d dl mZ ddlmZ  G d„ de«      Zy)é    )Úplugin_reporté   )ÚSubcommandsCommandc                   ó   — e Zd ZdZdZd„ Zy)ÚDeleteOrphanedPluginsCommandz•Delete plugins from the CMSPlugins table that should have instances but don't, and ones for which a corresponding plugin model can no longer be foundzdelete-orphaned-pluginsc                 ó  — | j                   j                  d«       g }g }t        «       D ]=  }|d   s|d   D ]  }|j                  |«       Œ |d   D ]  }|j                  |«       Œ Œ? |j	                  d«      r#t        dt        |«      t        |«      fz  «      }nd}|dk(  ré| j                   j                  d«       |D ]:  }|j                  r|j                  j                  |«       Œ+|j                  «        Œ< |D ]:  }|j                  r|j                  j                  |«       Œ+|j                  «        Œ< | j                   j                  d	t        |«      › d
t        |«      › d«       | j                   j                  d«       yy)au  
        Obtains a plugin report -
        cms.management.commands.subcommands.list.plugin_report - and uses it
        to delete orphaned plugins from the database, i.e. ones that are no
        longer installed, and ones that have no corresponding saved plugin
        instances (as will happen if a plugin is inserted into a placeholder,
        but not saved).
        zObtaining plugin report
ÚmodelÚ	instancesÚunsaved_instancesÚinteractivezã
You have requested to delete any instances of uninstalled plugins and empty plugin instances.
There are %d uninstalled plugins and %d empty plugins.
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: ÚyeszM... deleting any instances of uninstalled plugins and empty plugin instances
zDeleted instances of: 
    z uninstalled plugins  
    z  plugins with unsaved instances
z	all done
N)
ÚstdoutÚwriter   ÚappendÚgetÚinputÚlenÚplaceholderÚdelete_pluginÚdelete)ÚselfÚargsÚoptionsÚuninstalled_instancesr   ÚpluginÚinstanceÚconfirms           úk/home/dcms/DCMS/lib/python3.12/site-packages/cms/management/commands/subcommands/delete_orphaned_plugins.pyÚhandlez#DeleteOrphanedPluginsCommand.handle   s£  € ð 	‰×ÑÐ5Ô6Ø "ÐØÐä#“oò 	3ˆFØ˜'’?Ø & {Ñ 3ò ;HØ)×0Ñ0°Õ:ð;ð #Ð#6Ñ7ò 3Ø!×(Ñ(¨Õ2ñ3ð	3ð ;‰;}Ô%Üð /ô 36Ð6KÓ2LÌcÐRcÓNdÐ1eñ	fó g‰Gð ˆGàeÒàK‰K×ÑÐnÔoà1ò &Ø×'Ò'Ø×(Ñ(×6Ñ6°xÕ@à—O‘OÕ%ð	&ð .ò &Ø×'Ò'Ø×(Ñ(×6Ñ6°xÕ@à—O‘OÕ%ð	&ð K‰K×ÑØ.¬sÐ3HÓ/IÐ.JÐJfÔgjÐk|Óg}Ðf~ð  `ð  aôð K‰K×Ñ˜lÕ+ð' ó    N)Ú__name__Ú
__module__Ú__qualname__Úhelp_stringÚcommand_namer   © r    r   r   r      s   „ ð%€Kð -€Ló1,r    r   N)Ú(cms.management.commands.subcommands.listr   Úbaser   r   r&   r    r   ú<module>r)      s   ðÝ Bå $ô7,Ð#5õ 7,r    