
    .~h>                     V    d dl mZ d dlmZ d dlmZ ddlmZ ddlmZ	  G d de	      Zy	)
    )settings)authenticate)login   )signals)RegistrationViewc                        e Zd ZdZdZd Zd Zy)r   z
    A registration backend which implements the simplest possible
    workflow: a user supplies a username, email address and password
    (the bare minimum for a useful account), and is immediately signed
    up and logged in).

    registration_completec                     |j                         }t        |dd      }t        t        ||      |j                  d         }t	        | j
                  |       t        j                  j                  | j                  || j
                         |S )NUSERNAME_FIELDusername	password1)r   password)senderuserrequest)
savegetattrr   cleaned_datar   r   r   user_registeredsend	__class__)selfformnew_userusername_fields       k/var/www/peopleoo.sandbox-dev.co.uk/venv/lib/python3.12/site-packages/registration/backends/simple/views.pyregisterzRegistrationView.register   s~    99; +;ZHX~6&&{3

 	dllH%$$DNN*2-1\\ 	% 	;     c                 $    t        t        dd      S )a  
        Indicate whether account registration is currently permitted,
        based on the value of the setting ``REGISTRATION_OPEN``. This
        is determined as follows:

        * If ``REGISTRATION_OPEN`` is not specified in settings, or is
          set to ``True``, registration is permitted.

        * If ``REGISTRATION_OPEN`` is both specified and set to
          ``False``, registration is not permitted.

        REGISTRATION_OPENT)r   r   )r   s    r   registration_allowedz%RegistrationView.registration_allowed!   s     x!4d;;r   N)__name__
__module____qualname____doc__success_urlr   r"    r   r   r   r   	   s     *K<r   r   N)
django.confr   django.contrib.authr   r    r   viewsr   BaseRegistrationViewr(   r   r   <module>r.      s!      , %  =%<+ %<r   