
    npdW                         d dl mZ d dlmZ d dlmZ ddlT d dlmZ  G d de          Z	g d	Z
 G d
 dej                  Z G d dej                  ZdS )    )UserCreationForm)User)forms   )*)Fc            	           e Zd Z ej        d ej        ddd                    Z ej        dd ej        ddd          	          Z ej        dd ej        dd
d          	          Z	 G d d          Z
 fdZ xZS )
SignUpForm form-controlzEmail Address)classplaceholderattrs)labelwidgetd   
First Name)r   
max_lengthr   	Last Namec                       e Zd ZeZdZdS )SignUpForm.Meta)username
first_name	last_nameemail	password1	password2N)__name__
__module____qualname__r   modelfields     Q/Users/Home/Documents/Fywapp/Dev/Web_app/Django/Projects/tonal/tonal_app/forms.pyMetar      s        [r%   r'   c                 X    t          t          |           j        |i | d| j        d         j        j        d<   d| j        d         j        j        d<   d| j        d         _        d| j        d         _        d| j        d         j        j        d<   d	| j        d         j        j        d<   d| j        d         _        d
| j        d         _        d| j        d         j        j        d<   d| j        d         j        j        d<   d| j        d         _        d| j        d         _        d S )Nr   r   r   z	User Namer   r   z<span class="form-text text-muted"><small>Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.</small></span>r   Passworda  <ul class="form-text text-muted small"><li>Your password can't be too similar to your other personal information.</li><li>Your password must contain at least 8 characters.</li><li>Your password can't be a commonly used password.</li><li>Your password can't be entirely numeric.</li></ul>r   zConfirm Passwordzm<span class="form-text text-muted"><small>Enter the same password as before, for verification.</small></span>)superr
   __init__r#   r   r   r   	help_text)selfargskwargs	__class__s      r&   r+   zSignUpForm.__init__   s   (j$($9&9998FJ&,W5>IJ&,];(*J% -nJ)9GK '-g6?IK '-m<)+K & .RK *9GK '-g6?QK '-m<)+K & .]K ***r%   )r   r    r!   r   
EmailField	TextInputr   	CharFieldr   r   r'   r+   __classcell__r0   s   @r&   r
   r
      sD       E2oeo^kzD{D{.|.|.|}}}E rc/%/ao  @L  YM  YM  CN  CN  CN  O  O  OJbS`n  J  XK  XK  BL  BL  BL  M  M  MI\ \ \ \ \ \ \ \
] ] ] ] ] ] ] ] ]r%   r
   ))Orangesr6   )Cantaloupesr7   )Mangoesr8   )	Honeydewsr9   c                   2    e Zd Z fdZ ej        dej                            ddd          d          Z ej        dej                            ddd          d	          Z	 ej        dej                            d
dd          d	          Z
 ej        dej                            ddd          d	          Z ej        dej                            ddd          d	          Z ej        dej                            ddd          d	          Z ej        dej                            ddd          d	          Z ej        dej                            ddd          d	          Z ej        dej                            ddd          d          Z ej        dej                            e          d          Z ej        dej                                        d          Z G d d          Z xZS )AddRecordFormc                 ,   |                     d          | _         t          t          |           j        |i | t
          j                            | j                                      dd          }d |D             }|| j	        d         _
        d S )Npk)refr"   T)flatc                     g | ]}||fS r$   r$   ).0vars     r&   
<listcomp>z*AddRecordForm.__init__.<locals>.<listcomp>1   s    222#C:222r%   	testrever)pop
storage_pkr*   r;   r+   TDCobjectsfiltervalues_listr#   choices)r-   r.   r/   querysetrK   r0   s        r&   r+   zAddRecordForm.__init__-   s     **T**+mT""+T<V<<<;%%$/%::FFwUYFZZ22222)0K (((r%   TIDr   r   r   r   requiredr   r   r   r   r   EmailPhoneAddressCityFStateZipcode)rK   regarderD   c                   ,    e Zd ZeZdZdZdej        iZ	dS )AddRecordForm.Metauser__all__rD   N)
r   r    r!   Recordr"   excluder#   r   SelectMultiplewidgetsr$   r%   r&   r'   rY   H   s*         45r%   r'   )r   r    r!   r+   r   r3   r`   r2   idr   r   r   phoneaddresscitystatezipcodeSelectFRUIT_CHOICESrW   MultipleChoiceFieldCheckboxSelectMultiplerD   r'   r4   r5   s   @r&   r;   r;   +   st       1 1 1 1 1 
$u}/F/F\`jxMyMy/F/z/z  CG  
H  
H  
HB $u}7N7Ndp  {I  VJ  VJ7N  8K  8K  SU  V  V  VJem6M6Mcn  yG  UH  UH6M  7I  7I  QS  T  T  TIEOT%-2I2I_fp~PP2I  3A  3A  IK  L  L  LEEOT%-2I2I_fp~PP2I  3A  3A  IK  L  L  LEeotEM4K4Kaj  uC  SD  SD4K  5E  5E  MO  P  P  PG5?D1H1H^dn|O}O}1H1~1~  GI  J  J  JDEOU5=3J3J`gq  RA  RA3J  4B  4B  JL  M  M  MEeotEM4K4Kaj  uC  SD  SD4K  5E  5E  MV  W  W  WGeouU]5I5IR_5I5`5`hqrrrG))5@d@d@f@fnyzzzI6 6 6 6 6 6 6 6 6 6 6 6r%   r;   c                       e Zd Z ej        dej                            ddd          d          Z ej        dej                            ddd          d          Z G d	 d
          Z	dS )BDCformFr   r   rN   r   r   rO   r   c                       e Zd ZeZdZdS )BDCform.MetarZ   N)r   r    r!   rG   r"   r^   r$   r%   r&   r'   rn   U   s        r%   r'   N)
r   r    r!   r   r3   r`   r2   r>   r"   r'   r$   r%   r&   rl   rl   Q   s        
%/51H1H^j  uC  PD  PD1H  2E  2E  MO  P  P  PCEOU5=3J3J`k  vD  RE  RE3J  4F  4F  NP  Q  Q  QE         r%   rl   N)django.contrib.auth.formsr   django.contrib.auth.modelsr   djangor   modelsdjango.db.modelsr   r
   rh   	ModelFormr;   rl   r$   r%   r&   <module>ru      s    6 6 6 6 6 6 + + + + + +                ] ] ] ] ]! ] ] ]:  !6 !6 !6 !6 !6EO !6 !6 !6L    eo     r%   