
    df%                     >    d dl mZ d dlmZmZ  G d de          ZdS )    )
AppCommand)DEFAULT_DB_ALIASconnectionsc                   ,     e Zd ZdZdZ fdZd Z xZS )CommandzLPrints the SQL statements for resetting sequences for the given app name(s).Tc                     t                                          |           |                    dt          d           d S )Nz
--databasezNNominates a database to print the SQL for. Defaults to the "default" database.)defaulthelp)superadd_argumentsadd_argumentr   )selfparser	__class__s     lD:\Python Project\djangoTemplates\venv\Lib\site-packages\django/core/management/commands/sqlsequencereset.pyr   zCommand.add_arguments   sM    f%%%$	 	 	
 	
 	
 	
 	
    c                     |j         d S t          |d                  }|                    d          }|j                            | j        |          }|s&|d         dk    r| j                            d           d                    |          S )NdatabaseT)include_auto_created	verbosity   zNo sequences found.
)	models_moduler   
get_modelsopssequence_reset_sqlstylestderrwritejoin)r   
app_configoptions
connectionmodels
statementss         r   handle_app_configzCommand.handle_app_config   s    #+F !45
&&D&AA^66tz6JJ
 	5gk2a77K3444yy$$$r   )__name__
__module____qualname__r
   output_transactionr   r&   __classcell__)r   s   @r   r   r      sW        V 	 	
 	
 	
 	
 	
% % % % % % %r   r   N)django.core.management.baser   	django.dbr   r   r    r   r   <module>r/      sc    2 2 2 2 2 2 3 3 3 3 3 3 3 3% % % % %j % % % % %r   