
    Vh                     v    d dl mZmZmZ eZdZdZd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_functionae  
module: django_check
author:
  - Alexei Znamensky (@russoz)
short_description: Wrapper for C(django-admin check)
version_added: 9.1.0
description:
  - This module is a wrapper for the execution of C(django-admin check).
extends_documentation_fragment:
  - community.general.attributes
  - community.general.django
options:
  database:
    description:
      - Specify databases to run checks against.
      - If not specified, Django will not run database tests.
    type: list
    elements: str
  deploy:
    description:
      - Include additional checks relevant in a deployment setting.
    type: bool
    default: false
  fail_level:
    description:
      - Message level that will trigger failure.
      - Default is the Django default value. Check the documentation for the version being used.
    type: str
    choices: [CRITICAL, ERROR, WARNING, INFO, DEBUG]
  tags:
    description:
      - Restrict checks to specific tags.
    type: list
    elements: str
  apps:
    description:
      - Restrict checks to specific applications.
      - Default is to check all applications.
    type: list
    elements: str
notes:
  - The outcome of the module is found in the common return values RV(ignore:stdout), RV(ignore:stderr), RV(ignore:rc).
  - The module will fail if RV(ignore:rc) is not zero.
attributes:
  check_mode:
    support: full
  diff_mode:
    support: none
ai  
- name: Check the entire project
  community.general.django_check:
    settings: myproject.settings

- name: Create the project using specific databases
  community.general.django_check:
    database:
      - somedb
      - myotherdb
    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 C(verbosity) >= 3
version:
  description: Version of Django.
  type: str
  returned: always
  sample: 5.1.2
  version_added: 10.0.0
)DjangoModuleHelper)cmd_runner_fmtc                      e Zd Z e e edd       edd       edg d       edd       edd      	      d
      Z e  ej                  ej                        d       ej                  d       ej                  d        ej                  ej                        d       ej                         	      Z
dZdZy)DjangoCheckliststr)typeelementsboolF)r   default)CRITICALERRORWARNINGINFODEBUG)r   choices)databasedeploy
fail_leveltagsappsT)argument_specsupports_check_modez
--databasez--deployz--fail-levelz--tagcheckz$database deploy fail_level tags appsN)__name__
__module____qualname__dictmoduler   stack
as_opt_valas_boolas_listarg_formatsdjango_admin_cmddjango_admin_arg_order     r/home/dcms/DCMS/lib/python3.12/site-packages/ansible_collections/community/general/plugins/modules/django_check.pyr	   r	   \   s    v6VU30ab6E26E2
 !	F @%%%n&?&?@N%~%%j1,>,,^<<!^!!.";";<WE#^##%K Cr+   r	   c                  ,    t         j                          y )N)r	   executer*   r+   r,   mainr/   r   s    r+   __main__N)
__future__r   r   r   r   __metaclass__DOCUMENTATIONEXAMPLESRETURNAansible_collections.community.general.plugins.module_utils.djangor   Eansible_collections.community.general.plugins.module_utils.cmd_runnerr   r	   r/   r   r*   r+   r,   <module>r8      sZ    A @0d
 a `D$ D, zF r+   