+
    Tj>                        R t ^ RIHt ^ RIHtHtHtHt ^ RIH	t	 ^ RI
Ht ^ RIHtHt ^ RIHtHt ^ RIHtHt ^ RIHt ^ R	IHtHtHtHt ^ R
IHt ^ RIHt ^ RI H!t!H"t" ^ RI#H$t$ ^ RI#H%t& R5t'Rt(R6R lt)R6R lt*R t+R7RRRR/R llt, ! R R4      t- ! R  R!]4      t. ! R" R]]4      t/ ! R# R]/].R$7      t0]0RRRRRRRRR3
R% lt1 ! R& R]]4      t2]0R]2^R'R'RRRRR'RRRRRR'RRRRR'3R( lt3 ! R) R]24      t4R8R* lt5]0]4RRR^R'RRRRR'RRRRRR'RRRRR'3R+ lt6 ! R, R-]4      t7 ! R. R/4      t8 ! R0 R1]4      t9 ! R2 R]4      t: ! R3 R]:4      t;R4 t<R# )9z[
Helper functions for creating Form classes from Django models
and database field objects.
)chain)NON_FIELD_ERRORS
FieldErrorImproperlyConfiguredValidationErrorProhibitNullCharactersValidator)
AltersData)ChoiceFieldField)BaseFormDeclarativeFieldsMetaclass)BaseFormSetformset_factory)	ErrorList)HiddenInputMultipleHiddenInputRadioSelectSelectMultiple)BaseChoiceIterator)make_hashable)capfirstget_text_listgettext)gettext_lazy	ModelFormBaseModelFormModelChoiceFieldModelMultipleChoiceFieldBaseModelFormSetBaseInlineFormSet__all__Nc                   ^ RI Hp VP                  pV P                  p. pVP                   EF  pVP
                  '       d-   \        WP                  4      '       g   VP                  V9  d   KD  Ve   VP                  V9  d   K[  V'       d   VP                  V9   d   Kv  VP                  4       '       d   WP                  ,          P                  P                  P                  V P                  V P                  V P                  VP                  4      4      '       dH   VP!                  VP                  4      WP                  ,          P                  P"                  9   d   EK=  \        WP$                  4      '       d   VP'                  V4       EKl  VP)                  WVP                  ,          4       EK  	  V F%  pVP)                  WVP                  ,          4       K'  	  V# )z
Construct and return a model instance from the bound ``form``'s
``cleaned_data``, but do not save the returned instance to the database.
)models)	django.dbr$   _metacleaned_datafieldseditable
isinstance	AutoFieldnamehas_defaultfieldwidgetvalue_omitted_from_datadatafiles
add_prefixgetempty_values	FileFieldappendsave_form_data)	forminstancer(   excluder$   optsr'   file_field_listfs	   &&&&     H/var/www/idalgo/venv/lib/python3.14/site-packages/django/forms/models.pyconstruct_instancer@   2   sZ   
 !>>D$$LO[[


!--..vv\)!&&"6qvv(
 MMOOVV""))AA		4::tqvv'>    (DL,>,>,K,KK a))**""1%XAFF';<7 : 	#78  O    c                N   V P                   p/ p\        VP                  VP                  VP                  4       Fg  p\        VRR4      '       g   K  Ve   VP                  V9  d   K/  V'       d   VP                  V9   d   KJ  VP                  V 4      WEP                  &   Ki  	  V# )ab  
Return a dict containing the data in ``instance`` suitable for passing as
a Form's ``initial`` keyword argument.

``fields`` is an optional list of field names. If provided, return only the
named.

``exclude`` is an optional list of field names. If provided, exclude the
named from the returned dict, even if they are listed in the ``fields``
argument.
r)   F)r&   r   concrete_fieldsprivate_fieldsmany_to_manygetattrr,   value_from_object)r:   r(   r;   r<   r1   r>   s   &&&   r?   model_to_dictrH   c   s     >>DD4'')<)<d>O>OPq*e,,!&&"6qvv(**84VV Q KrA   c                   ^ RI HpHpHp \	        V R4      '       d   \	        V R4      '       d   V P                  4       pV'       d   Tp\        WS4      '       g	   V! R/ VB pWS! V! R4      R7      ,          pV P                  P                  V! V P                  P                  P                  P                  V4      4      4      V n        R# R# R# R# )z=Apply limit_choices_to to the formfield's queryset if needed.)ExistsOuterRefQquerysetget_limit_choices_topk)rO   N )django.db.modelsrJ   rK   rL   hasattrrN   r*   rM   filtermodel_base_manager)	formfieldrJ   rK   rL   limit_choices_tocomplex_filters   &     r?   #apply_limit_choices_to_to_formfieldrY   |   s    44y*%%')=S*T*T$99;-Nn00!"!6%5!6a8D>22N!*!3!3!:!:y))//==DD^TU"I  +U%rA   apply_limit_choices_toTform_declared_fieldsc
               t   T;'       g    / p/ p. pV P                   p^ RIHp VP                   Uu. uF  p\	        VV4      '       g   K  VNK  	  pp\        \        VP                  VVP                  4      4       EFj  p\        VRR4      '       gU   VeO   VP                  V9   d>   Ve   VP                  V9  d)   \        RVP                  : RV P                  : R24      hKk  Ve   VP                  V9  d   K  V'       d   VP                  V9   d   K  VP                  V9   d#   VVP                  ,          VVP                  &   K  / pV'       d(   VP                  V9   d   VVP                  ,          VR&   V\        8X  g   V'       d   VP                  V9   d   RVR	&   V'       d(   VP                  V9   d   VVP                  ,          VR
&   V'       d(   VP                  V9   d   VVP                  ,          VR&   V'       d(   VP                  V9   d   VVP                  ,          VR&   V	'       d(   VP                  V	9   d   V	VP                  ,          VR&   Vf   VP                  ! R/ VB pM%\        V4      '       g   \!        R4      hV! V3/ VB pV'       d&   V
'       d   \#        V4       VVVP                  &   EKO  VP%                  VP                  4       EKm  	  V'       d<   V Uu/ uF/  pV'       d
   VV9  g   K  VV9  g   K  VVP'                  V4      bK1  	  ppV# u upi u upi )a=  
Return a dictionary containing form fields for the given model.

``fields`` is an optional list of field names. If provided, return only the
named fields.

``exclude`` is an optional list of field names. If provided, exclude the
named fields from the returned fields, even if they are listed in the
``fields`` argument.

``widgets`` is a dictionary of model field names mapped to a widget.

``formfield_callback`` is a callable that takes a model field and returns
a form field.

``localized_fields`` is a list of names of fields which should be
localized.

``labels`` is a dictionary of model field names mapped to a label.

``help_texts`` is a dictionary of model field names mapped to a help text.

``error_messages`` is a dictionary of model field names mapped to a
dictionary of error messages.

``field_classes`` is a dictionary of model field names mapped to a form
field class.

``apply_limit_choices_to`` is a boolean indicating if limit_choices_to
should be applied to a field's queryset.

``form_declared_fields`` is a dictionary of form fields created directly on
a form.
)r   r)   F'z' cannot be specified for z) model form as it is a non-editable fieldr/   Tlocalizelabel	help_texterror_messages
form_classz1formfield_callback must be a function or callablerP   )r&   rQ   r   rD   r*   sortedr   rC   rE   rF   r,   r   __name__
ALL_FIELDSrV   callable	TypeErrorrY   r7   r4   )rT   r(   r;   widgetsformfield_callbacklocalized_fieldslabels
help_textsra   field_classesrZ   r[   
field_dictignoredr<   
ModelFieldr>   sortable_private_fieldskwargsrV   s   &&&&&&&&&&$$        r?   fields_for_modelrs      s   b 0552JG;;D4 &&&a*Q
*C&   d""$;T=N=NO q*e,,"FFf$_g(= ,-FFENND  !&&"6qvv(66))!5aff!=Jqvvqvv(&qvvF8z)+;!;!%F:aff&$QVVnF7O!&&J.",QVV"4F;aff6'5aff'=F#$QVV}4#0#8F< %-f-I,--OPP*177I%3I>!*JqvvNN166"ef  
q/ !56g5E !Az~~a   	 

 yn
s#   L0
L07L5L5L5L5c                   *   a  ] tR tRt o RR ltRtV tR# )ModelFormOptionsi  Nc                n   \        VR R4      V n        \        VRR4      V n        \        VRR4      V n        \        VRR4      V n        \        VRR4      V n        \        VRR4      V n        \        VRR4      V n        \        VRR4      V n        \        VR	R4      V n	        \        VR
R4      V n
        R# )rT   Nr(   r;   rh   rj   rk   rl   ra   rm   ri   )rF   rT   r(   r;   rh   rj   rk   rl   ra   rm   ri   )selfoptionss   &&r?   __init__ModelFormOptions.__init__  s    Wgt4
gx6w	48w	48 '1CT Jgx6!'<>%g/?F$WotD")'3G"NrA   )
ra   r;   rm   r(   ri   rl   rk   rj   rT   rh   N)rd   
__module____qualname____firstlineno__ry   __static_attributes____classdictcell____classdict__s   @r?   ru   ru     s     
O 
OrA   ru   c                   2   a a ] tR tRt oV 3R ltRtVtV ;t# )ModelFormMetaclassi  c                t  < \         SV `  WW#4      pV\        38X  d   V# \        \	        VR R4      4      ;qTn        R FU  p\	        WV4      p\        V\        4      '       g   K&  V\        8w  g   K3  RRVP                  RVRV/,          p\        V4      h	  VP                  '       Edw   VP                  f!   VP                  f   \        RV,          4      hVP                  \        8X  d   RVn        \        VP                  VP                  VP                  VP                   VP"                  VP$                  VP&                  VP(                  VP*                  VP,                  RVP.                  R7      p	V	P1                  4        U
Uu0 uF  w  rV'       d   K  V
kK  	  pp
pVP3                  VP.                  4      pV'       d<   R	pVR
P5                  V4      VP                  P                  3,          p\7        V4      hV	P9                  VP.                  4       MVP.                  p	Wn        V# u upp
i )MetaNzP%(model)s.Meta.%(opt)s cannot be a string. Did you mean to type: ('%(value)s',)?rT   optvaluez|Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is prohibited; form %s needs updating.F)rZ   r[   z&Unknown field(s) (%s) specified for %sz, )r(   r;   rj   )super__new__r   ru   rF   r&   r*   strre   rd   rg   rT   r(   r;   r   rs   rh   ri   rj   rk   rl   ra   rm   declared_fieldsitems
differencejoinr   updatebase_fields)mcsr,   basesattrs	new_classr<   r   r   msgr(   kvnone_model_fieldsmissing_fieldsmessage	__class__s   &&&&           r?   r   ModelFormMetaclass.__new__  s   GOCu<	]$$!1')VT2R!SS
 =CD&E%%%%:*=<  !3!3s   n$ = :::{{"t||';*&(,-  {{j( #%

''%%##""',%.%>%>F" 06||~ G~tqQ~ G.99):S:STNBDIIn5tzz7J7JKK ))MM)334..F & !Hs   H4H4rP   )rd   r|   r}   r~   r   r   r   __classcell__r   r   s   @@r?   r   r     s     E ErA   r   c                      a a ] tR tRt oRRRRR]RRRRR3V 3R lltR tR tR tR	 t	R
 t
R tR tRR ltR]n        RtVtV ;t# )r   i[  Nid_%sFc                  < V P                   pVP                  f   \        R4      hV	f   VP                  4       V n        / pM&Wn        \	        WP
                  VP                  4      pVe   VP                  V4       RV n        RV n	        \        SV `-  VVVVVVVVV
VR7
       V P
                  P                  4        F  p\        V4       K  	  R # )Nz'ModelForm has no model class specified.F)use_required_attributerenderer)r&   rT   
ValueErrorr:   rH   r(   r;   r   _validate_unique_validate_constraintsr   ry   valuesrY   )rw   r1   r2   auto_idprefixinitialerror_classlabel_suffixempty_permittedr:   r   r   r<   object_datarV   r   s   &&&&&&&&&&&&   r?   ry   BaseModelForm.__init__\  s     zz::FGG JJLDMK$M'++t||LKw'
 !&%*"#9 	 	
 ++-I/	: .rA   c                   \        4       pV P                  P                  P                   EF  pVP                  pW0P                  9  d   VP                  VP                  4       K=  V P                  P                  '       d8   W0P                  P                  9  d   VP                  VP                  4       K  V P                  P                  '       d8   W0P                  P                  9   d   VP                  VP                  4       K  W0P                  9   d   VP                  VP                  4       EK  V P                  V,          pV P                  P                  V4      pVP                  '       d   EKT  VP                  '       d   EKi  WTP                  9   g   EK|  VP                  VP                  4       EK  	  V# )zy
For backwards-compatibility, exclude several types of fields from model
validation. See tickets #12507, #12521, #12553.
)setr:   r&   r(   r,   addr;   _errorsr'   r4   blankrequiredr5   )rw   r;   r>   r.   
form_fieldfield_values   &     r?   _get_validation_exclusions(BaseModelForm._get_validation_exclusions  s(   
 % $$++AFFE KK'AFF#
 """uJJ4E4E'EAFF####1C1C(CAFF# ,,&AFF# "[[/
"//33E:&///#'>'>>KK'E ,F rA   c                6    R V n         R V n        V P                  # T)r   r   r'   rw   s   &r?   cleanBaseModelForm.clean  s     $%)"   rA   c                L   V P                   p\        VR 4      '       d   VP                  pM\        V/pVP	                  4        F  w  rEV\        8X  d@   VP
                  '       d.   \        VP
                  9   d   VP
                  \        ,          pM0W@P                  9   d   V P                  V,          P
                  pMK  V FE  p\        V\        4      '       g   K  VP                  V9   g   K.  WgP                  ,          Vn
        KG  	  K  	  V P                  RV4       R# )
error_dictN)r&   rR   r   r   r   ra   r(   r*   r   coder   	add_error)rw   errorsr<   r   r.   messagesra   r   s   &&      r?   _update_errorsBaseModelForm._update_errors  s     zz 6<((**J*F3J)//1OE))'''$(;(;;!%!4!45E!F++%!%U!3!B!B#w886&4\\&BGO $  2& 	tV$rA   c                   V P                   pV P                  4       pV P                  P                  4        F.  w  r4\	        V\
        4      '       g   K  VP                  V4       K0  	   \        W P                  VP                  VP                  4      V n         V P                  P                  VRRR7       V P                  '       d   V P                  4        V P                  '       d   V P!                  4        R # R #   \         d   pT P                  T4        R p?LR p?ii ; i  \         d   pT P                  T4        R p?LR p?ii ; i)NF)r;   validate_uniquevalidate_constraints)r&   r   r(   r   r*   InlineForeignKeyFieldr   r@   r:   r;   r   r   
full_cleanr   r   r   r   )rw   r<   r;   r,   r.   es   &     r?   _post_cleanBaseModelForm._post_clean  s   zz113  ;;,,.KD%!677D! /	#.mmT[[$,,DM	#MM$$U %       "%%%%%' &  	#""	#  	#""	#s0   *0D D* D'D""D'*E5EEc                    V P                  4       p V P                  P                  VR7       R#   \         d   pT P	                  T4        Rp?R# Rp?ii ; i)zj
Call the instance's validate_unique() method and update the form's
validation errors if any were raised.
r;   N)r   r:   r   r   r   rw   r;   r   s   &  r?   r   BaseModelForm.validate_unique  sM    
 113	#MM))'): 	#""	#   0 AAAc                    V P                  4       p V P                  P                  VR7       R#   \         d   pT P	                  T4        Rp?R# Rp?ii ; i)zo
Call the instance's validate_constraints() method and update the form's
validation errors if any were raised.
r   N)r   r:   r   r   r   r   s   &  r?   r   "BaseModelForm.validate_constraints  sM    
 113	#MM..w.? 	#""	#r   c                   V P                   pV P                  P                  pV P                  P                  pV P                  P                  p\        VP                  VP                  4       F  p\        VR4      '       g   K  V'       d   VP                  V9  d   K2  V'       d   VP                  V9   d   KM  VP                  V9   g   K`  VP                  V P                  WP                  ,          4       K  	  R# )zC
Save the many-to-many fields and generic relations for this form.
r8   N)r'   r&   r;   r(   r:   r   rE   rD   rR   r,   r8   )rw   r'   r;   r(   r<   r>   s   &     r?   	_save_m2mBaseModelForm._save_m2m  s     ((**$$""}}"" t(($*=*=>A1.//!&&.166W,vv%  VV0DE ?rA   Tc                   V P                   '       d[   \        RV P                  P                  P                  : RV P                  P
                  P                  '       d   RMR: R24      hV'       d7   V P                  P                  4        V P                  4        V P                  # V P                  V n	        V P                  # )z
Save this form's self.instance object if commit=True. Otherwise, add
a save_m2m() method to the form which can be called after the instance
is saved manually at a later time. Return the model instance.
zThe z could not be createdchangedz" because the data didn't validate.)
r   r   r:   r&   object_name_stateaddingsaver   save_m2m)rw   commits   &&r?   r   BaseModelForm.save.  s     ;;; MM''33!%!5!5!<!<!<I)K  MM NN
 }} !NNDM}}rA   )r   r   r:   r   r   )rd   r|   r}   r~   r   ry   r   r   r   r   r   r   r   r   alters_datar   r   r   r   s   @@r?   r   r   [  sg      #.;`+Z!
%B"(H	#	#F*0 DrA   c                       ] tR tRtRtR# )r   iI  rP   N)rd   r|   r}   r~   r   rP   rA   r?   r   r   I  s    rA   )	metaclassc                   RV /pVe   W+R&   Ve   W;R&   Ve   W[R&   Ve   WkR&   Ve   W{R&   Ve   WR&   V	e   WR	&   V
e   WR
&   \        VR4      '       d   VP                  3MRp\        RW4      pV'       d   \        V4      Vn        V P
                  R,           pRV/p\        VRR4      f   \        VRR4      f   \        R4      h\        V4      ! W3V4      # )a  
Return a ModelForm containing form fields for the given model. You can
optionally pass a `form` argument to use as a starting point for
constructing the ModelForm.

``fields`` is an optional list of field names. If provided, include only
the named fields in the returned fields. If omitted or '__all__', use all
fields.

``exclude`` is an optional list of field names. If provided, exclude the
named fields from the returned fields, even if they are listed in the
``fields`` argument.

``widgets`` is a dictionary of model field names mapped to a widget.

``localized_fields`` is a list of names of fields which should be
localized.

``formfield_callback`` is a callable that takes a model field and returns
a form field.

``labels`` is a dictionary of model field names mapped to a label.

``help_texts`` is a dictionary of model field names mapped to a help text.

``error_messages`` is a dictionary of model field names mapped to a
dictionary of error messages.

``field_classes`` is a dictionary of model field names mapped to a form
field class.
rT   Nr(   r;   rh   rj   rk   rl   ra   rm   r   FormzZCalling modelform_factory without defining 'fields' or 'exclude' explicitly is prohibited.rP   )rR   r   typestaticmethodri   rd   rF   r   )rT   r9   r(   r;   ri   rh   rj   rk   rl   ra   rm   r   r   r   
class_nameform_class_attrss   &&&&&&&&&&&     r?   modelform_factoryr   M  s   b eE h"i"i#$4 ! h(l!"0 !.o $D&11TYYLrE%D"./A"B&(J ~tXt$,y$1O1W"2
 	
 :j'+;<<rA   c                      a a ] tR tRt oRtRtRt]! 4       tRRR/V 3R lllt	V 3R lt
R tR	 tV 3R
 ltR tRR ltRR ltRR ltRR ltR]n        R tR tR tR tR tRR ltRR ltV 3R ltRtVtV ;t# )r    i  zG
A ``FormSet`` for editing a queryset and/or adding new objects to it.
NFr   c               T   < WPn         W`n        \        SV `  ! R/ R VRVRVRV/VCB  R# )r1   r2   r   r   NrP   )rM   initial_extrar   ry   )	rw   r1   r2   r   r   rM   r   rr   r   s	   &&&&&&$,r?   ry   BaseModelFormSet.__init__  sE     !$ 	
7&	
 	
rA   c                v   < V P                   '       g   \        V P                  4       4      # \        SV `  4       # )z=Return the number of forms that are required in this FormSet.)is_boundlenget_querysetr   initial_form_countrw   r   s   &r?   r   #BaseModelFormSet.initial_form_count  s.    }}}t((*++w)++rA   c                    \        V R 4      '       g0   V P                  4        Uu/ uF  q"P                  VbK  	  upV n        V P                  P	                  V4      # u upi )_object_dict)rR   r   rO   r   r4   )rw   rO   os   && r?   _existing_object!BaseModelFormSet._existing_object  sT    t^,,262C2C2E F2EQq2E FD  $$R(( !Gs   Ac                n    VP                   e   VP                   P                  4       pK*  VP                  # )zs
If the field is a related field, fetch the concrete field's (that
is, the ultimate pointed-to field's) to_python.
)remote_fieldget_related_field	to_pythonrw   r.   s   &&r?   _get_to_pythonBaseModelFormSet._get_to_python  s.    
   ,&&88:ErA   c                j  < WP                  4       8  pV'       d   V P                  '       d   V P                  V4      : R V P                  P                  P
                  P                  : 2p V P                  V,          pV P                  V P                  P                  P
                  4      p V! V4      pV P                  V4      VR&   MXV P                  4       V,          VR&   M=V P                  '       d,    V P                  WP                  4       ,
          ,          VR&   \        SV `@  ! V3/ VB pV'       dA   RVP"                  V P                  P                  P
                  P                  ,          n        V#   \         d     Lhi ; i  \         d     Lyi ; i  \         d     Li ; i)-r:   r   T)r   r   r3   rT   r&   rO   r,   r1   r  r   r   KeyErrorr   r   
IndexErrorr   _construct_formr(   r   )	rw   irr   pk_requiredpk_keyrO   r  r9   r   s	   &&,     r?   r	   BaseModelFormSet._construct_form  sr   1133}}}$(OOA$6

8H8H8K8K8P8PQG6*B !% 3 3DJJ4D4D4G4G HIG&r] .2-B-B2-Fz*%)%6%6%8%;z"$($6$6q;R;R;T7T$Uy! w&q3F3=ADKK

((++001:# +      (  s6   /F 2F =*F$ FFF! F!$F21F2c                ^   \        V R 4      '       g   V P                  e   V P                  pM$V P                  P                  P	                  4       pVP
                  '       g:   VP                  V P                  P                  P                  P                  4      pWn
        V P                  # 	_queryset)rR   rM   rT   _default_managerr   orderedorder_byr&   rO   r,   r  )rw   qss   & r?   r   BaseModelFormSet.get_queryset  sz    t[))}}(]]ZZ00==?
 :::[[!1!1!4!4!9!9:
  N~~rA   Tc                &    VP                  VR7      # )z8Save and return a new model instance for the given form.r   r   )rw   r9   r   s   &&&r?   save_newBaseModelFormSet.save_new      yyy''rA   c                &    VP                  VR7      # )z>Save and return an existing model instance for the given form.r  r  )rw   r9   objr   s   &&&&r?   save_existingBaseModelFormSet.save_existing  r  rA   c                :    V'       d   VP                  4        R# R# )z#Deletes an existing model instance.N)delete)rw   r  r   s   &&&r?   delete_existing BaseModelFormSet.delete_existing  s    JJL rA   c                   a  V'       g   . S n         V 3R lpVS n        S P                  '       d   S P                  V4      # S P                  V4      S P	                  V4      ,           # )zt
Save model instances for every form, adding and changing instances
as necessary, and return the list of instances.
c                  N   < SP                    F  p V P                  4        K  	  R # r{   )saved_formsr   )r9   rw   s    r?   r   'BaseModelFormSet.save.<locals>.save_m2m)  s     ,,DMMO -rA   )r&  r   	edit_onlysave_existing_objectssave_new_objects)rw   r   r   s   f& r?   r   BaseModelFormSet.save!  sY    
 !D$ %DM>>>--f55--f58M8Mf8UUUrA   c                &    V P                  4        R # r{   )r   r   s   &r?   r   BaseModelFormSet.clean5  s    rA   c                v  a a \        4       p\        4       pS P                  pS P                   Uu. uF%  pVP                  4       '       g   K  WC9  g   K#  VNK'  	  ppV FT  oSP	                  4       pSP
                  P                  VR R7      w  rxVP                  V4       VP                  V4       KV  	  . p	V EF  w  r\        4       pV F  oVV 3R lV 4       p\        ;QJ d    . R V 4       F  NK  	  5M! R V 4       4      pV'       g   KF  RV9  g   KO  W9   d   V	P                  S P                  V4      4       S P                  S P                  4       .S P                  R7      SP                  \        &   V F#  pVSP                   9   g   K  SP                   V K%  	  VP#                  V4       K  	  EK  	  V EFW  p\        4       pVw  p
pppV EF;  oSP                   '       g   K  SP                   V,          f   K/  SP                   V,          f   KF  VR8X  d8   SP                   V,          pVP$                  VP&                  VP(                  3pM\+        SP                   V,          V4      3pSP                   V,          .VO5pVV9   dk   V	P                  S P-                  V4      4       S P                  S P                  4       .S P                  R7      SP                  \        &   SP                   V VP#                  V4       EK>  	  EKZ  	  V	'       d   \/        V	4      hR# u upi )T)r;   include_meta_constraintsc              3      <"   T F>  pVSP                   9   g   K  VSP                  9   d   TMSP                   V,          x  K@  	  R # 5ir{   )r'   unique_fields).0r.   r9   rw   s   & r?   	<genexpr>3BaseModelFormSet.validate_unique.<locals>.<genexpr>R  sG      !- 1 11 WUd&8&88Ed>O>OPU>VV!-s
   A	.A	c              3   |   "   T F2  p\        VR 4      '       d   VP                  4       M
\        V4      x  K4  	  R# 5i)_get_pk_valN)rR   r6  r   )r2  ds   & r?   r3  r4  X  s?      ! &	 #1m44  +1-.
 &s   :<N)r   date)r   deleted_formsformsis_validr   r:   _get_unique_checksr   tupler7   get_unique_error_messager   get_form_errorr   r   r   r'   r   yearmonthdayrF   get_date_error_messager   )rw   all_unique_checksall_date_checksforms_to_deleter9   valid_formsr;   unique_checksdate_checksr   uclassunique_check	seen_datarow_datar.   
date_checklookup
unique_forr8  	date_datar1   s   f   `                r?   r    BaseModelFormSet.validate_unique8  s   E%,, 


"}} #'#> D" 	 

  D557G)-)I)I)- *J *&M $$]3"";/   $5 FI#!- !5 ! &!55 ! &!  8H 4  , d&C&CL&QR9=9I9I!0023%)]] :J :%56 &2E$(9(99$($5$5e$< &2 MM(+G $ %6N *JI0:-FFE:# %%%))%0<))*5A '#00<%)YY

DHH$E	 &-T->->z-JF%S$U	 --e4AyAD y( d&A&A*&MN9=9I9I!0023%)]] :J :%56 !--e4MM$'? $ *H !&)) w
s   L6L6L6c                    \        V4      ^8X  d   \        R4      RV^ ,          /,          # \        R4      R\        V\        R4      4      /,          # )   z0Please correct the duplicate data for %(field)s.r.   zFPlease correct the duplicate data for %(field)s, which must be unique.and)r   r   r   _)rw   rK  s   &&r?   r>  )BaseModelFormSet.get_unique_error_message  s_    |!MNaR   X |QuX> rA   c           
     n    \        R 4      RV^,          RV^,          R\        V^,          4      /,          # )zoPlease correct the duplicate data for %(field_name)s which must be unique for the %(lookup)s in %(date_field)s.
field_name
date_fieldrO  )r   r   )rw   rN  s   &&r?   rC  'BaseModelFormSet.get_date_error_message  sA    I
 *Q-*Q-c*Q-(

 	
rA   c                    \        R 4      # )z*Please correct the duplicate values below.r   r   s   &r?   r?  BaseModelFormSet.get_form_error  s    CDDrA   c           	     H   . V n         . V n        V P                  '       g   . # . pV P                  pV P                   F  pVP                  pVP                  4       '       g   K'  WC9   d0   V P                  P                  V4       V P                  WQR 7       K\  VP                  4       '       g   Kt  V P                   P                  WTP                  34       VP                  V P                  WEVR 7      4       V'       d   K  V P                  P                  V4       K  	  V# r  )changed_objectsdeleted_objectsinitial_formsr9  r:   
_is_pk_setr7   r"  has_changedchanged_datar  r&  )rw   r   saved_instancesrF  r9   r  s   &&    r?   r)  &BaseModelFormSet.save_existing_objects  s    !!!!!I,,&&D--C
 >>##&$$++C0$$S$8!!##$$++S2C2C,DE&&t'9'9$F'9'STv$$++D1 '  rA   c                t   . V n         V P                   F  pVP                  4       '       g   K  V P                  '       d   V P	                  V4      '       d   KF  V P                   P                  V P                  W!R 7      4       V'       d   K{  V P                  P                  V4       K  	  V P                   # r_  )new_objectsextra_formsrd  
can_delete_should_delete_formr7   r  r&  )rw   r   r9   s   && r?   r*  !BaseModelFormSet.save_new_objects  s    $$D##%% 4#;#;D#A#A##DMM$M$FG6  ''- % rA   c                V  <a	a
 ^ RI Ho	HpHp V P                  P
                  P                  ;V n        pV	V
3R lo
S
! V4      '       g   VP                  VP                  9  Ed   VP                  '       d@   VP                  P                  P                  '       d   RMVP                  P                  pM* Ve#   V P                  4       V,          P                  pMRp \!        WSV34      '       d0   VP"                  P                  P$                  P                  4       pM$V P                  P$                  P                  4       pVP'                  VP                  P                  P(                  4      pVP
                  P*                  '       d@   VP
                  P*                  P-                  V P                  P                  \.        4      pM\.        p\1        WvRVR7      VP                  V P                  P                  &   \2        SV `i  W4       R#   \         d    Rp ELFi ; i)z0Add a hidden field for the object's primary key.)r+   
ForeignKeyOneToOneFieldc                 J  < V P                   '       * ;'       g    V P                  ;'       gw    \        V S4      ;'       gc    V P                  ;'       dO    V P                  P                  ;'       d1    S! V P                  P
                  P                  P                  4      # r{   )r)   auto_createdr*   r   parent_linkrT   r&   rO   )rO   r+   pk_is_not_editables   &r?   rt  7BaseModelFormSet.add_fields.<locals>.pk_is_not_editable  s    [[  OO@z"i'@  OO K K33K K*2??+@+@+F+F+I+IJrA   NF)r   r   r/   )rQ   r+   ro  rp  rT   r&   rO   	_pk_fieldr,   r(   r   r:   r   r   r   r  r*   r   r  usingdbrh   r4   r   r   r   
add_fields)rw   r9   indexro  rp  rO   pk_valuer  r/   r+   rt  r   s   &&&      @@r?   ry  BaseModelFormSet.add_fields  s   II"jj..111		 b!!RWWDKK%?}}} $(==#7#7#>#>#>4DMMDTDT$(#'#4#4#6u#=#@#@#' "=9::__**;;HHJZZ00==?$--..112Bzz!!!++//0C0C[Q$/?uV0DKK++, 	4' " $#H$s   8%H H H('H()
r   rv  r  r`  ra  r   ri  rM   r   r&  )NNr   NNr   )rd   r|   r}   r~   __doc__rT   r(  r   r1  ry   r   r   r  r	  r   r  r  r"  r   r   r   r   r>  rC  r?  r)  r*  ry  r   r   r   r   s   @@r?   r    r      s      EI EM
 
 
.,)
 D&((
V$ Da*F

E4 0( 0(rA   Fc                    \        VRR4      p\        VRV4      f   \        VRV	4      f   \        R4      h\        V VVV	VV
VVVVVR7      p\        VVVVVVVVVVVVR7      pV Vn        VVn        V# )z8Return a FormSet class for the given Django model class.r   Nr(   r;   z]Calling modelformset_factory without defining 'fields' or 'exclude' explicitly is prohibited.)
r9   r(   r;   ri   rh   rj   rk   rl   ra   rm   )
extramin_nummax_num	can_orderrk  validate_minvalidate_maxabsolute_maxcan_delete_extrar   )rF   r   r   r   rT   r(  )rT   r9   ri   formsetr  rk  r  r  r(   r;   rh   r  rj   rk   rl   ra   r  r  rm   r  r  r   r(  metaFormSets   &&&&&&&&&&&&&&&&&&&&&&&  r?   modelformset_factoryr    s    4 4&Dh'/D)W-5"2
 	

 -)%#D !!!)G GM!GNrA   c                      a a ] tR tRt oRtRV 3R lltV 3R ltV 3R lt]R 4       t	RV 3R llt
V 3R ltV 3R	 ltR
tVtV ;t# )r!   iV  z0A formset for child objects related to a parent.c                  < Vf+   V P                   P                  P                  4       V n        MW0n        W@n        Vf   V P                  P
                  pV P                  P                  4       '       d4   VP                  ! R/ V P                   P                  V P                  /B pMVP                  4       pV P                   P                  0V n
        \        S	V `0  ! W3RVRV/VB  V P                  P                  P                  '       d   V P                   P                  V P                  P                  P                  9  d   \!        V P                  P                  P                  4      V P                  P                  n        V P                  P                  P                  P#                  V P                   P                  4       R # R # R # )Nr   rM   rP   )fkr   rT   r:   save_as_newr  rc  rS   r,   noner1  r   ry   r9   r&   r(   listr7   )
rw   r1   r2   r:   r  r   rM   rr   r  r   s
   &&&&&&&, r?   ry   BaseInlineFormSet.__init__Y  s6     GG00668DM$M&zz22H==##%%ADGGLL$--#@ABB"ggll^KVKbKFK 99??!!!dggll$))//:P:P&P%)$))//*@*@%ADIIOO"IIOO""))$'',,7 'Q!rA   c                H   < V P                   '       d   ^ # \        SV `	  4       # )    )r  r   r   r   s   &r?   r   $BaseInlineFormSet.initial_form_countw  s     w)++rA   c                \  < \         SV `  ! V3/ VB pV P                  '       d   \        VP                  R R4      pVe   RVP                  n        RVP                  VP                  V P                  P                  4      &   RVP                  VP                  V P                  P                  4      &   Ve   WCP                  n        V P                  P                  pV P                  P                  P                  V P                  P                  P                  P                  P                  P                  8w  dB   \        V P                  V P                  P                  P                  4      p\        VRV4      p\!        VP                  V P                  P"                  V4       V# )_mutableNTrO   )r   r	  r  rF   r1   r  r3   rv  r,   r  r:   rO   r   rY  rT   r&   setattrattname)rw   r
  rr   r9   mutablefk_valuer   s   &&,   r?   r	  !BaseInlineFormSet._construct_form|  s0   w&q3F3diiT:G"%)		" ?CDIIdoodnn&9&9:;7;DIIdoodggll34"%,		" ==##77**dgg.B.B.H.H.N.N.Q.Q.V.VVt}}dgg.B.B.M.MNHxx8Htww9rA   c                    V P                   P                  P                  V P                  R 7      P	                  RR4      # ))rT   + )r  r   get_accessor_namerT   replace)clss   &r?   get_default_prefix$BaseInlineFormSet.get_default_prefix  s2    vv""443994EMMcSUVVrA   c                   < \        VP                  V P                  P                  V P                  4       \        SV `  WR 7      # r_  )r  r:   r  r,   r   r  )rw   r9   r   r   s   &&&r?   r  BaseInlineFormSet.save_new  s4     	tww||T]];w44rA   c                  < \         SV `  W4       V P                  V P                  8X  d   V P                  P                  pR R/pM[V P                  P                  pR\        VP                  P                  V4      R\        V P                  P                  4      4      /pV P                  P                  P                  V P                  P                  P                  P                  P                  P                  8w  d$   V P                  P                  P                  VR&   V P                  P                   P"                  '       d   VP                  R4      e.   V P                  P                  P%                  VR,          4      pM V P                  P                  P                  pVP'                  4       '       d   VP(                  V P                  P                  P                  P                  P                  P                  8X  g   VP*                  '       g"   \-        V P                  VP(                  R4       \/        V P                  3/ VB VP                  V&   R# )pk_fieldTr_   to_fieldN)r   ry  rv  r  r,   rF   r(   r4   r   verbose_namer   rY  rT   r&   rO   r:   r   r   	get_fieldr-   r  r1   r  r   )rw   r9   rz  r,   rr   r  r   s   &&&   r?   ry  BaseInlineFormSet.add_fields  s   4'>>TWW$>>&&D $'F
 77<<DKKOOD)7HTWW=Q=Q4RF 77**dgg.B.B.H.H.N.N.Q.Q.V.VV!%!5!5!@!@F: ==&&&zz*%1==..88
9KL==..11##%%   DGG$8$8$>$>$D$D$G$G$L$LLyyyx'7'7>1$--J6JDrA   c                   < V Uu. uF!  q"V P                   P                  8w  g   K  VNK#  	  pp\        SV `  V4      # u upi r{   )r  r,   r   r>  )rw   rK  r.   r   s   && r?   r>  *BaseInlineFormSet.get_unique_error_message  s<    +7Q<%DGGLL;P<Qw/== Rs   >>)r:   r  r1  )NNNFNNr   )rd   r|   r}   r~   r}  ry   r   r	  classmethodr  r  ry  r>  r   r   r   r   s   @@r?   r!   r!   V  sC     :8<,
. W W5&KP> >rA   c                   ^ RI Hp VP                  pV'       Ed   VP                   Uu. uF  qfP                  V8X  g   K  VNK  	  pp\        V4      ^8X  Ed%   V^ ,          p. V P                  P                  OV N5p	\        W4      '       d   VP                  P                  P                  P                  '       d0   VP                  P                  P                  P                  V	9  gg   VP                  P                  P                  P                  '       g_   VP                  P                  V 8w  dD   VP                  P                  V	9  d)   \        RV: RV P                  P                  : R24      hV# V'       g)   \        RVP                  P                  : RV: R24      h X# . V P                  P                  OV N5p	VP                   Uu. uF  p\        Wd4      '       g   K  VP                  P                  V 8X  g   VP                  P                  V	9   gd   VP                  P                  P                  P                  '       g   K~  VP                  P                  P                  P                  V	9   g   K  VNK  	  pp\        V4      ^8X  d   V^ ,          pV# V'       gG   V'       d   R# \        RVP                  P                  : RV P                  P                  : R24      h\        RVP                  P                  : R	V P                  P                  : R
24      hu upi u upi )a,  
Find and return the ForeignKey from model to parent if there is one
(return None if can_fail is True and no such field exists). If fk_name is
provided, assume it is the name of the ForeignKey field. Unless can_fail is
True, raise an exception if there isn't a ForeignKey from model to
parent_model.
)ro  z	fk_name 'z' is not a ForeignKey to 'z'.r]   z' has no field named 'Nz' has no ForeignKey to 'z#' has more than one ForeignKey to 'z*'. You must specify a 'fk_name' attribute.)rQ   ro  r&   r(   r,   r   all_parentsr*   r   rT   proxyproxy_for_modelr   r_   )
parent_modelrT   fk_namecan_failro  r<   r>   fks_to_parentr  r  s
   &&&&      r?   _get_foreign_keyr    s    ,;;Dw$(KKEKq66W3DKE}"q!BIL..::ILIKr.. OO))//555--33CC;V --33999--=--[@ ! 2 2 8 8: Z IS 38;;3D3DgN  R IG F**66EE [[
 !(  $$4>>'';6NN((..44  ,,22BBkQ A  	 
 }"q!B( I'  KK%% &&,,   KK%% &&,,	 o F:
s$   L8L8L=2A#L=,L=L=c                    \        WVR7      pVP                  '       d   ^p
/ RVbRVbRVbRVbRV	bRVbRVbR	VbR
VbRV
bRVbRVbRVbRVbRVbRVbRVbRVRVRVRVRV/Cp\        V3/ VB pVVn        V# )z
Return an ``InlineFormSet`` for the given kwargs.

``fk_name`` must be provided if ``model`` has more than one ``ForeignKey``
to ``parent_model``.
)r  r9   ri   r  r  rk  r  r(   r;   r  r  rh   r  r  rj   rk   rl   ra   rm   r  r  r   r(  )r  uniquer  r  )r  rT   r9   r  r  r(   r;   r  r  rk  r  ri   rh   r  rj   rk   rl   ra   r  r  rm   r  r  r   r(  r  rr   r  s   &&&&&&&&&&&&&&&&&&&&&&&&&   r?   inlineformset_factoryr    s.   B 
,w	?B	yyy0 	7 		
 	j 	Y 	& 	7 	7 	7 	7 	 	 	, 	&  	j!" 	.#$ 	,HY-F0 #53F3GGJNrA   c                   f   a a ] tR tRt oRt]tR]! R4      /tRRRR/V 3R	 llt	R
 t
R tRtVtV ;t# )r   i_  zk
A basic integer field that deals with validating the given value to a
given parent instance in an inline.
invalid_choicez3The inline value did not match the parent instance.r  Fr  Nc                 < Wn         W n        W0n        V P                   eP   V P                  '       d%   \        V P                   V P                  4      VR&   MV P                   P                  VR&   RVR&   \
        SV `  ! V/ VB  R # )Nr   Fr   )parent_instancer  r  rF   rO   r   ry   )rw   r  r  r  argsrr   r   s   &&$$*,r?   ry   InlineForeignKeyField.__init__j  su    .  +}}}$+D,@,@$--$Py!$($8$8$;$;y!"z$)&)rA   c                z   WP                   9   d!   V P                  '       d   R # V P                  # V P                  '       d"   \	        V P                  V P                  4      pMV P                  P
                  p\        V4      \        V4      8w  d   \        V P                  R,          RR7      hV P                  # )Nr  r   )	r5   r  r  r  rF   rO   r   r   ra   )rw   r   origs   && r?   r   InlineForeignKeyField.cleanv  s    %%%}}}'''===4//?D''**Du:T"!##$45<L  ###rA   c                    R # )FrP   )rw   r   r1   s   &&&r?   rd  !InlineForeignKeyField.has_changed  s    rA   )r  r  r  )rd   r|   r}   r~   r}  r   r/   rV  default_error_messagesry   r   rd  r   r   r   r   s   @@r?   r   r   _  sF     
 F!QR
* 
* 
*$" rA   r   c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )ModelChoiceIteratorValuei  c                    Wn         W n        R # r{   )r   r:   )rw   r   r:   s   &&&r?   ry   !ModelChoiceIteratorValue.__init__  s    
 rA   c                ,    \        V P                  4      # r{   )r   r   r   s   &r?   __str__ ModelChoiceIteratorValue.__str__  s    4::rA   c                ,    \        V P                  4      # r{   )hashr   r   s   &r?   __hash__!ModelChoiceIteratorValue.__hash__  s    DJJrA   c                d    \        V\        4      '       d   VP                  pV P                  V8H  # r{   )r*   r  r   )rw   others   &&r?   __eq__ModelChoiceIteratorValue.__eq__  s(    e566KKEzzU""rA   )r:   r   N)
rd   r|   r}   r~   ry   r  r  r  r   r   r   s   @r?   r  r    s     ! # #rA   r  c                   >   a  ] tR tRt o R tR tR tR tR tRt	V t
R# )	ModelChoiceIteratori  c                4    Wn         VP                  V n        R # r{   r.   rM   r  s   &&r?   ry   ModelChoiceIterator.__init__  s    
rA   c              #    "   V P                   P                  e   RV P                   P                  3x  V P                  pVP                  '       g   VP	                  4       pV F  pV P                  V4      x  K  	  R # 5i)Nr  )r.   empty_labelrM   _prefetch_related_lookupsiteratorchoice)rw   rM   r  s   &  r?   __iter__ModelChoiceIterator.__iter__  sf     ::!!-tzz--..==111((*HC++c"" s   AB.Bc                    V P                   P                  4       V P                  P                  e	   ^,           # ^ ,           # r{   )rM   countr.   r  r   s   &r?   __len__ModelChoiceIterator.__len__  s4     }}""$TZZ-C-C-OWWUVWWrA   c                v    V P                   P                  R J;'       g    V P                  P                  4       # r{   )r.   r  rM   existsr   s   &r?   __bool__ModelChoiceIterator.__bool__  s,    zz%%T1KKT]]5I5I5KKrA   c                    \        V P                  P                  V4      V4      V P                  P                  V4      3# r{   )r  r.   prepare_valuelabel_from_instancerw   r  s   &&r?   r  ModelChoiceIterator.choice  s7    $TZZ%=%=c%BCHJJ**3/
 	
rA   r  N)rd   r|   r}   r~   ry   r  r  r  r  r   r   r   s   @r?   r  r    s%     '#XL
 
rA   r  c                   
  a a ] tR tRt oRtR]! R4      /t]tRRRRR	R
RR
RR
RRRR
RR
RR/	R lt	R t
R tV 3R ltR tR t]! ]]4      tR tR t]! ]]P(                  P*                  4      tV 3R ltR tR tR tRtVtV ;t# ) r   i  z1A ChoiceField whose choices are a model QuerySet.r  zGSelect a valid choice. That choice is not one of the available choices.r  z	---------r   Tr/   Nr_   r   r`   r  to_field_namerW   r   Fc       	            \         P                  ! V 3R VRVRVRVRV/VB  V'       d   Vf)   \        V P                  \        4      '       d   V
'       g	   RV n        MW n        Wn        Wn        Wn        R# )r   r/   r_   r   r`   N)	r   ry   r*   r/   r   r  rM   rW   r  )rw   rM   r  r   r/   r_   r   r`   r  rW   r   rr   s   &&$$$$$$$$$,r?   ry   ModelChoiceField.__init__  s    " 		
	
 	
 		

 	
  	
 	
 ,t{{K00#D*  0*rA   c                &    \        4       pV! V4      # r{   r   )rw   r   non_null_character_validators   && r?   validate_no_null_characters,ModelChoiceField.validate_no_null_characters  s    'F'H$+E22rA   c                p    \        V P                  4      '       d   V P                  4       # V P                  # )zi
Return ``limit_choices_to`` for this form field.

If it is a callable, invoke it and return the result.
)rf   rW   r   s   &r?   rN   %ModelChoiceField.get_limit_choices_to  s0     D))**((**$$$rA   c                   < \         \        V `  V4      pV P                  e    V P                  P	                  4       Vn        V# r{   )r   r
   __deepcopy__rM   all)rw   memoresultr   s   && r?   r  ModelChoiceField.__deepcopy__  s7    {D6t<==$"mm//1FOrA   c                    V P                   # r{   r  r   s   &r?   _get_querysetModelChoiceField._get_queryset   s    ~~rA   c                r    Vf   R MVP                  4       V n        V P                  V P                  n        R # r{   )r  r  choicesr/   )rw   rM   s   &&r?   _set_querysetModelChoiceField._set_queryset  s&    !)!1x||~"llrA   c                    \        V4      # )z
Convert objects into strings and generate the labels for the choices
presented by this object. Subclasses can override this method to
customize the display of the choices.
)r   r  s   &&r?   r  $ModelChoiceField.label_from_instance  s     3xrA   c                `    \        V R 4      '       d   V P                  # V P                  V 4      # )_choices)rR   r
  r  r   s   &r?   _get_choicesModelChoiceField._get_choices  s,     4$$==  }}T""rA   c                   < \        VR 4      '       d:   V P                  '       d   VP                  V P                  4      # VP                  # \        SV `  V4      # )r&   )rR   r  serializable_valuerO   r   r  )rw   r   r   s   &&r?   r  ModelChoiceField.prepare_value$  sL    5'""!!!//0B0BCCxxw$U++rA   c                   WP                   9   d   R # V P                  V4        V P                  ;'       g    Rp\        WP                  P
                  4      '       d   \        W4      pV P                  P                  ! R/ W!/B pV#   \        \        T P                  P
                  P                  \        3 d#    \        T P                  R,          RRT/R7      hi ; i)NrO   r  r   r   paramsrP   )r5   r  r  r*   rM   rT   rF   r4   r   rg   DoesNotExistr   ra   )rw   r   keys   && r?   r  ModelChoiceField.to_python,  s    %%%((/	$$,,C%!4!455+MM%%55E  MM,,	
 
	 "##$45%' 
	s   B
 AB
 
AC!c                .    \         P                  ! W4      # r{   )r   validaterw   r   s   &&r?   r  ModelChoiceField.validateB  s    ~~d**rA   c                    V P                   '       d   R # Ve   TMRpVe   TMRp\        V P                  V4      4      \        V4      8g  # )Fr  )disabledr   r  )rw   r   r1   initial_value
data_values   &&&  r?   rd  ModelChoiceField.has_changedE  sE    ===#*#6B!-T2
4%%m45ZHHrA   )r  r  rW   rM   r  )rd   r|   r}   r~   r}  rV  r  r  r  ry   r  rN   r  r  r  propertyrM   r  r  r
   r  fsetr  r  r  rd  r   r   r   r   s   @@r?   r   r     s     ;
 	!U

 #H"+  	"+
 "+ "+ "+ "+ "+ "+ "+ "+H3%+ }5H# |[%8%8%=%=>G,,+I IrA   c                      a a ] tR tRt oRt]t]tR]	! R4      R]	! R4      R]	! R4      /t
V 3R	 ltR
 tR tR tV 3R ltR tRtVtV ;t# )r   iM  z9A MultipleChoiceField whose choices are a model QuerySet.invalid_listzEnter a list of values.r  zESelect a valid choice. %(value)s is not one of the available choices.invalid_pk_valueu"   “%(pk)s” is not a valid value.c                .   < \         SV `  ! V3R R/VB  R# )r  N)r   ry   )rw   rM   rr   r   s   &&,r?   ry   !ModelMultipleChoiceField.__init__Z  s    >t>v>rA   c                J    V'       g   . # \        V P                  V4      4      # r{   )r  _check_valuesr  s   &&r?   r  "ModelMultipleChoiceField.to_python]  s     ID&&u-..rA   c                   V P                  V4      pV P                  '       d'   V'       g   \        V P                  R ,          R R7      hV P                  '       g#   V'       g   V P                  P                  4       # \        V\        \        34      '       g   \        V P                  R,          RR7      hV P                  V4      pV P                  V4       V# )r   r  r"  )r  r   r   ra   rM   r  r*   r  r=  r'  run_validators)rw   r   r  s   && r?   r   ModelMultipleChoiceField.cleanb  s    ""5)===!$"5"5j"A
SSu==%%''%$//!##N3#  & 	E"	rA   c           	        V P                   ;'       g    Rp \        V4      pT F2  pT P                  T4        T P                  P                  ! R	/ Y#/B  K4  	  T P                  P                  ! R	/ RT,          T/B pT Uu0 uF  p\        \        YR4      4      kK  	  ppT F4  p\        T4      T9  g   K  \        T P                  R,          RRT/R7      h	  T#   \         d     \        T P                  R,          RR7      hi ; i  \        \        \        3 d#    \        T P                  R,          RRT/R7      hi ; iu upi )
z
Given a list of possible PK values, return a QuerySet of the
corresponding objects. Raise a ValidationError if a given value is
invalid (not a valid PK, not in the queryset, etc.)
rO   r"  r  r#  r  z%s__inr  r   rP   )r  	frozensetrg   r   ra   r  rM   rS   r   r   rF   )rw   r   r  rO   r  r   pksvals   &&      r?   r'  &ModelMultipleChoiceField._check_valuess  sN      ((D	e$E B,,R0$$1y1  ]]!!<X^U$;<-/0Rs71?#R0C3xs"%''(89)#S>   	3  	!##N3# 	 	?; %''(:;+ ":  1s   C DE*D	8Ec                   < \        VR 4      '       dJ   \        V\        4      '       g4   \        VR4      '       g"   \        SV `  pV Uu. uF
  q2! V4      NK  	  up# \        SV `  V4      # u upi )r  r&   )rR   r*   r   r   r  )rw   r   r  r   r   s   &&  r?   r  &ModelMultipleChoiceField.prepare_value  sc    E:&&uc**E7++!G1M.34eM!$e44w$U++ 5s   
A,c                   V P                   '       d   R # Vf   . pVf   . p\        V4      \        V4      8w  d   R# V P                  V4       Uu0 uF  p\        V4      kK  	  ppV Uu0 uF  p\        V4      kK  	  ppWT8g  # u upi u upi )FT)r  r   r  r   )rw   r   r1   r   initial_setdata_sets   &&&   r?   rd  $ModelMultipleChoiceField.has_changed  s    ===?G<Dw<3t9$/3/A/A'/JK/Jes5z/JK,01D5CJD1&& L1s   B)BrP   )rd   r|   r}   r~   r}  r   r/   r   hidden_widgetrV  r  ry   r  r   r'  r  rd  r   r   r   r   s   @@r?   r   r   M  sc     CF'M34!S
 	ABC?/
"$L,' 'rA   c                     \        V R 4      ;'       d9    V P                  P                  RJ;'       g    V P                  P                  RJ# )r&   N)rR   r&   r(   r;   )rb   s   &r?   modelform_defines_fieldsr9    sH    :w'  t+SSz/?/?/G/Gt/SrA   )r   r   rH   rs   r   r   re   r    r  r!   r  r   )NN)	NNNNNNNNN)NF)=r}  	itertoolsr   django.core.exceptionsr   r   r   r   django.core.validatorsr   django.db.models.utilsr	   django.forms.fieldsr
   r   django.forms.formsr   r   django.forms.formsetsr   r   django.forms.utilsr   django.forms.widgetsr   r   r   r   django.utils.choicesr   django.utils.hashabler   django.utils.textr   r   django.utils.translationr   r   rV  r"   re   r@   rH   rY   rs   ru   r   r   r   r   r    r  r!   r  r  r   r  r  r   r   r9  rP   rA   r?   <module>rG     s  
   C - 2 C > (  4 / 5 , 6 
+b2"t  t tnO OF3 FRkHj k\	); 	 
V=xc({J c(P 

/ANr>( r>jLd 

3?J)E )X# #"
, 
>OI{ OIda'/ a'HrA   