
    Vh	                     ~    d dl mZmZmZ eZdZdZdZd dl	Z	d dl
mZ d dlmZ  G d d	e      Zd
 Zedk(  r e        yy)    )absolute_importdivisionprint_functiona  
module: django_command
author:
  - Alexei Znamensky (@russoz)
short_description: Run Django admin commands
version_added: 9.0.0
description:
  - This module allows the execution of arbitrary Django admin commands.
extends_documentation_fragment:
  - community.general.attributes
  - community.general.django
attributes:
  check_mode:
    support: none
  diff_mode:
    support: none
options:
  command:
    description:
      - Django admin command. It must be a valid command accepted by C(python -m django) at the target system.
    type: str
    required: true
  extra_args:
    type: list
    elements: str
    description:
      - List of extra arguments passed to the django admin command.
aw  
- name: Check the project
  community.general.django_command:
    command: check
    settings: myproject.settings

- name: Check the project in specified python path, using virtual environment
  community.general.django_command:
    command: check
    settings: fancysite.settings
    pythonpath: /home/joedoe/project/fancysite
    venv: /home/joedoe/project/fancysite/venv
z
run_info:
  description: Command-line execution information.
  type: dict
  returned: success and O(verbosity) >= 3
version:
  description: Version of Django.
  type: str
  returned: always
  sample: 5.1.2
  version_added: 10.0.0
N)DjangoModuleHelper)cmd_runner_fmtc            	           e Zd Z e e edd       edd            d      Z e ej                         	      Zd
Zd Z	y)DjangoCommandstrT)typerequiredlist)r   elements)command
extra_argsF)argument_specsupports_check_mode)r   r   c                 t    t        j                  | j                  j                        | j                  _        y N)shlexsplitvarsr   )selfs    t/home/dcms/DCMS/lib/python3.12/site-packages/ansible_collections/community/general/plugins/modules/django_command.py__init_module__zDjangoCommand.__init_module__U   s!    !KK		(9(9:		    N)
__name__
__module____qualname__dictmoduler   as_listarg_formatsdjango_admin_arg_orderr    r   r   r	   r	   H   sT    ed3%8
 "F )>))+K *;r   r	   c                  ,    t         j                          y r   )r	   executer$   r   r   mainr'   Y   s    r   __main__)
__future__r   r   r   r   __metaclass__DOCUMENTATIONEXAMPLESRETURNr   Aansible_collections.community.general.plugins.module_utils.djangor   Eansible_collections.community.general.plugins.module_utils.cmd_runnerr   r	   r'   r   r$   r   r   <module>r0      sY    A @:
  ` `;& ;" zF r   