ó
    |chL$  ã            
       óº  • S r SSKJr  SSKJr  SSKJr  SSKJ	r	  SSK
Jr  SSKJr  SSKJrJrJr  SS	KJr  SS
KJr  S rS r " S S5      r " S S\\R2                  5      r " S S\\R6                  5      r " S S\R:                  \R<                  \5      r " S S\R@                  \R:                  \RB                  \RD                  \R<                  \5      r#g)a�  
ViewSets are essentially just a type of class based view, that doesn't provide
any method handlers, such as `get()`, `post()`, etc... but instead has actions,
such as `list()`, `retrieve()`, `create()`, etc...

Actions are only bound to methods at the point of instantiating the views.

    user_list = UserViewSet.as_view({'get': 'list'})
    user_detail = UserViewSet.as_view({'get': 'retrieve'})

Typically, rather than instantiate views from viewsets directly, you'll
register the viewset with a router and let the URL conf be determined
automatically.

    router = DefaultRouter()
    router.register(r'users', UserViewSet, 'user')
    urlpatterns = router.urls
é    )Úupdate_wrapper)Ú
getmembers)ÚVERSION)ÚNoReverseMatch)Úclassonlymethod)Úcsrf_exempt)ÚgenericsÚmixinsÚviews)ÚMethodMapper)Úreversec                 ó\   • [        U S5      =(       a    [        U R                  [        5      $ )NÚmapping)ÚhasattrÚ
isinstancer   r   )Úattrs    Ú`/var/www/djangovue.mamus.xyz/django/venv/lib/python3.13/site-packages/rest_framework/viewsets.pyÚ_is_extra_actionr       s   € Ü�4˜Ó#×N¬
°4·<±<ÄÓ(NÐNó    c                 óN   • U R                   U:X  d   SR                  XS95       eU $ )NzãExpected function (`{func.__name__}`) to match its attribute name (`{name}`). If using a decorator, ensure the inner function is decorated with `functools.wraps`, or that `{func.__name__}.__name__` is otherwise set to `{name}`.©ÚfuncÚname)Ú__name__Úformatr   s     r   Ú_check_attr_namer   $   s7   € Ø�=‰=˜DÓ ð Fð	(÷ *0©°T¨Ð)Eó	FÐ ð
 €Kr   c                   ó\   ^ • \ rS rSrSr\S	S j5       rU 4S jrS r\	S 5       r
S rSrU =r$ )
ÚViewSetMixiné-   aH  
This is the magic.

Overrides `.as_view()` so that it takes an `actions` keyword that performs
the binding of HTTP methods to actions on the Resource.

For example, to create a concrete view binding the 'GET' and 'POST' methods
to the 'list' and 'create' actions...

view = MyViewSet.as_view({'get': 'list', 'post': 'create'})
c                 ó4  ^ ^^• ST l         ST l        ST l        ST l        ST l        T(       d  [        S5      eT H^  nUT R                  ;   a  [        SU< ST R                  < S35      e[        T U5      (       a  MD  [        T R                  < SU< 35      e   ST;   a  ST;   a  [        S	T R                  -  5      eUU U4S
 jn[        UT SS9  [        UT R                  SS9  T Ul        TUl        TUl        [        S:¼  a  SUl        [!        U5      $ )zÄ
Because of the way class based views create a closure around the
instantiated view, we need to totally reimplement `.as_view`,
and slightly modify the view function that is created and returned.
NzwThe `actions` argument must be provided when calling `.as_view()` on a ViewSet. For example `.as_view({'get': 'list'})`zYou tried to pass in the z& method name as a keyword argument to z(). Don't do that.z() received an invalid keyword r   ÚsuffixzO%s() received both `name` and `suffix`, which are mutually exclusive arguments.c                 óú   >• T" S0 T	D6nST;   a  ST;  a  TS   TS'   TUl         TR                  5        H  u  pE[        X55      n[        X4U5        M     Xl        Xl        X#l        UR                  " U /UQ70 UD6$ )NÚgetÚhead© )Ú
action_mapÚitemsÚgetattrÚsetattrÚrequestÚargsÚkwargsÚdispatch)
r*   r+   r,   ÚselfÚmethodÚactionÚhandlerÚactionsÚclsÚ
initkwargss
          €€€r   ÚviewÚ"ViewSetMixin.as_view.<locals>.viewg   s‰   ø€ ÙÑ$˜Ñ$ˆDà˜Ó F°'Ó$9Ø")¨%¡.�˜‘ð
 &ˆDŒOð #*§-¡-¦/‘�Ü! $Ó/�Ü˜ gÖ.ñ #2ð #ŒLØŒIØ ŒKð —=’= Ð:¨4Ò:°6Ñ:Ð:r   r%   )Úupdated)Úassigned)é   é   F)r   Údescriptionr!   ÚdetailÚbasenameÚ	TypeErrorÚhttp_method_namesr   r   r   r-   r3   r4   r2   ÚDJANGO_VERSIONÚlogin_requiredr   )r3   r2   r4   Úkeyr5   s   ```  r   Úas_viewÚViewSetMixin.as_view:   s/  ú€ ð ˆŒØˆŒð
 ˆŒ
ð ˆŒ
ð ˆŒö Üð :ó ;ð ;ó
 ˆCØ�c×+Ñ+Ó+Ýã#&¨¯¬ð!6ó 7ð 7ô ˜3 ×$Ó$ÜØ—L”L¢#ð!'ó (ð (ñ ð �ZÓ H°
Ó$:Üð <Ø?B¿|¹|ñMó Nð N÷	;ô2 	�t˜S¨"Ò-ô 	�t˜SŸ\™\°BÒ7ð
 ˆŒØ$ˆŒØˆŒô ˜VÓ#Ø"'ˆDÔä˜4Ó Ð r   c                 óÂ   >• [         TU ]  " U/UQ70 UD6nUR                  R                  5       nUS:X  a	  SU l        U$ U R
                  R                  U5      U l        U$ )zK
Set the `.action` attribute on the view, depending on the request method.
ÚoptionsÚmetadata)ÚsuperÚinitialize_requestr/   Úlowerr0   r&   r#   )r.   r*   r+   r,   r/   Ú	__class__s        €r   rI   ÚViewSetMixin.initialize_request”   se   ø€ ô ‘'Ò,¨WÐF°tÒF¸vÑFˆØ—‘×%Ñ%Ó'ˆØ�YÓð %ˆDŒKð ˆð Ÿ/™/×-Ñ-¨fÓ5ˆDŒKØˆr   c                 ó8  • U R                   < SU< 3nSnU R                  (       a;  U R                  R                  (       a   U R                  R                  R                  nU(       a  US-   U-   nUR	                  SU R                  5        [        U/UQ70 UD6$ )z.
Reverse the action for the given `url_name`.
Ú-NÚ:r*   )r=   r*   Úresolver_matchÚ	namespaceÚ
setdefaultr   )r.   Úurl_namer+   r,   rQ   s        r   Úreverse_actionÚViewSetMixin.reverse_action£   sy   € ð #ŸmœmªXÐ6ˆØˆ	Ø�<�<˜DŸL™L×7×7ØŸ™×3Ñ3×=Ñ=ˆIÞØ  3‘¨Ñ1ˆHØ×Ñ˜) T§\¡\Ô2ä�xÐ1 $Ò1¨&Ñ1Ð1r   c                 ój   • [        U [        5       VVs/ s H  u  p[        X!5      PM     snn$ s  snnf )z@
Get the methods that are marked as an extra ViewSet `@action`.
)r   r   r   )r3   r   r/   s      r   Úget_extra_actionsÚViewSetMixin.get_extra_actions±   s;   € ô ˜cÔ#3Ô4ô6â4ñ !�Dô ! Ö.á4ò6ð 	6ùó 6s   ”/c                 ó(  • 0 nU R                   c  U$ U R                  5        Vs/ s H!  nUR                   U R                   :X  d  M  UPM#     nnU H¨  n U R                  < SUR                  < 3nU R                  R
                  R                  nU(       a	  U< SU< 3n[        X@R                  U R                  U R                  S9nU R                  " S0 UR                  D6nXaUR                  5       '   Mª     U$ s  snf ! [         a     MÀ  f = f)z~
Build a map of {names: urls} for the extra actions.

This method will noop if `detail` was not provided as a view initkwarg.
rN   rO   )r*   r%   )r<   rW   r=   rS   r*   rP   rQ   r   r+   r,   rK   Úget_view_namer   )r.   Úaction_urlsr0   r2   rS   rQ   Úurlr5   s           r   Úget_extra_action_url_mapÚ%ViewSetMixin.get_extra_action_url_mapº   sü   € ð ˆð �;‰;ÑØÐð "&×!7Ñ!7Ô!9ó
Ú!9�vØ�}‰} §¡Ñ+÷ Ñ!9ð 	ð 
ó
 ˆFð
Ø&*§m¤m°V·_³_ÐE�Ø ŸL™L×7Ñ7×AÑA�	ÞÛ*3²XÐ>�Hä˜h¯	©	°4·;±;ÈÏÉÑU�Ø—~’~Ñ6¨¯©Ñ6�Ø47˜D×.Ñ.Ó0Ó1ñ ð Ðùò%
øô "ó Úðús   ¤C>ÁC>ÁB$DÄ
DÄD)r0   r&   r+   r,   r*   )N)r   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   rC   rI   rT   ÚclassmethodrW   r]   Ú__static_attributes__Ú__classcell__)rK   s   @r   r   r   -   sG   ø† ñ
ð óW!ó ðW!õrò2ð ñ6ó ð6÷ð r   r   c                   ó   • \ rS rSrSrSrg)ÚViewSetéÜ   zA
The base ViewSet class does not provide any actions by default.
r%   N©r   r_   r`   ra   rb   rd   r%   r   r   rg   rg   Ü   s   † ñò 	r   rg   c                   ó   • \ rS rSrSrSrg)ÚGenericViewSetéã   z°
The GenericViewSet class does not provide any actions by default,
but does include the base set of generic view behavior, such as
the `get_object` and `get_queryset` methods.
r%   Nri   r%   r   r   rk   rk   ã   s   † ñò
 	r   rk   c                   ó   • \ rS rSrSrSrg)ÚReadOnlyModelViewSetéì   zD
A viewset that provides default `list()` and `retrieve()` actions.
r%   Nri   r%   r   r   rn   rn   ì   s   † ñò 	r   rn   c                   ó   • \ rS rSrSrSrg)ÚModelViewSetéõ   z}
A viewset that provides default `create()`, `retrieve()`, `update()`,
`partial_update()`, `destroy()` and `list()` actions.
r%   Nri   r%   r   r   rq   rq   õ   s   † ñò 	r   rq   N)$rb   Ú	functoolsr   Úinspectr   Údjangor   r@   Údjango.urlsr   Údjango.utils.decoratorsr   Údjango.views.decorators.csrfr   Úrest_frameworkr	   r
   r   Úrest_framework.decoratorsr   Úrest_framework.reverser   r   r   r   ÚAPIViewrg   ÚGenericAPIViewrk   ÚRetrieveModelMixinÚListModelMixinrn   ÚCreateModelMixinÚUpdateModelMixinÚDestroyModelMixinrq   r%   r   r   Ú<module>rƒ      s¿   ðñõ$ %Ý å ,Ý &Ý 3Ý 4ç 2Ñ 2Ý 2Ý *òOò÷lñ lô^	ˆl˜EŸM™Mô 	ô	�\ 8×#:Ñ#:ô 	ô	˜6×4Ñ4Ø!×0Ñ0Ø)ô	ô
	�6×*Ñ*Ø×,Ñ,Ø×*Ñ*Ø×+Ñ+Ø×(Ñ(Ø!õ
	r   