OwlCyberSecurity - MANAGER
Edit File: forms.cpython-39.pyc
a ���e�D � @ s� d dl Z d dlmZ d dlmZmZmZ d dlmZm Z d dl mZ d dlm Z d dlmZ d dlmZ d d lmZ d d lmZ d dlmZ d dlmZ d d lmZ d dlmZ d dlmZ e� Z dd� Z!G dd� dej"�Z#G dd� dej$�Z%G dd� dej&�Z'G dd� dej(�Z)G dd� de)�Z*G dd� dej(�Z+G dd� dej,�Z-G d d!� d!ej,�Z.G d"d#� d#ej,�Z/G d$d%� d%e/�Z0G d&d'� d'ej,�Z1dS )(� N)�forms)�authenticate�get_user_model�password_validation)�UNUSABLE_PASSWORD_PREFIX�identify_hasher)�User)�default_token_generator)�get_current_site)�ValidationError)�EmailMultiAlternatives)�loader)�force_bytes)�urlsafe_base64_encode)�capfirst)�gettext)�gettext_lazyc C s t �d| ��� t �d|��� kS )z� Perform case-insensitive comparison of two identifiers, using the recommended algorithm from Unicode Technical Report 36, section 2.11.2(B)(2). �NFKC)�unicodedata� normalize�casefold)�s1�s2� r �Z/home/gouroczh/virtualenv/pat/3.9/lib/python3.9/site-packages/django/contrib/auth/forms.py�_unicode_ci_compare s ��r c s, e Zd ZdZdZ� fdd�Zdd� Z� ZS )�ReadOnlyPasswordHashWidgetz)auth/widgets/read_only_password_hash.htmlTc s� t � �|||�}g }|r"|�t�r6|�dtd�i� n^zt|�}W n$ tyf |�dtd�i� Y n.0 |�|�� � D ]\}}|�t|�|d�� qv||d<