/usr/local/lib/python3.9/site-packages/django/contrib/auth/management/commands/__pycache__
a Ӱ�h�3 � @ s� d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z ddl mZ ddlm Z mZ ddlmZ dd lmZ dd lmZ G dd� de�Zd ZG dd� de �ZdS )z* Management utility to create superusers. � N)�get_user_model)�get_default_username)�validate_password)� exceptions)�BaseCommand�CommandError)�DEFAULT_DB_ALIAS)�cached_property)�capfirstc @ s e Zd ZdS )�NotRunningInTTYExceptionN)�__name__� __module__�__qualname__� r r �a/usr/local/lib/python3.9/site-packages/django/contrib/auth/management/commands/createsuperuser.pyr s r �passwordc sl e Zd ZdZdZdZ� fdd�Zdd� Z� fdd �Zd d� Z dd d�Z ddd�Zedd� �Z dd� Z� ZS )�CommandzUsed to create a superuser.T)�stdinc s2 t � j|i |�� t� | _| jj�| jj�| _d S )N)�super�__init__r � UserModel�_meta� get_field�USERNAME_FIELD�username_field)�self�args�kwargs�� __class__r r r s �zCommand.__init__c C s� |j d| jj dd� |j ddddd| jj d � |j d tdd� | jjD ]l}| jj�|�}|jr�|jj r�|jj jj s�td | ��q�|j d| dd| fd� qJ|j d| d| d� qJd S )Nz--%sz&Specifies the login for the superuser.)�helpz --noinputz --no-input�store_false�interactivez�Tells Django to NOT prompt the user for input of any kind. You must use --%s with --noinput, along with an option for any other required field. Superusers created with --noinput will not be able to log in until they're given a valid password.)�action�destr z --databasez4Specifies the database to use. Default is "default".)�defaultr z\Required field '%s' specifies a many-to-many relation through model, which is not supported.�appendz?Specifies the %s for the superuser. Can be used multiple times.)r# r z#Specifies the %s for the superuser.)�add_argumentr r r �REQUIRED_FIELDSr r �many_to_many�remote_fieldZthroughZauto_createdr )r �parser� field_name�fieldr r r � add_arguments% sT ��� �� ������ �zCommand.add_argumentsc s"