
    h                     (    S SK Jr  S SKJr  S rS rg)    )parse)	force_strc                 ,   [         R                  " [        U 5      5      u  p4pVn[         R                  " USS9n[        U5      /U[        U5      '   [         R                  " [        UR                  5       5      SS9n[         R                  " X4XVU45      $ )zt
Given a URL and a key/val pair, set or replace an item in the query
parameters of the URL, and return the new URL.
Tkeep_blank_valuesdoseq)r   urlsplitr   parse_qs	urlencodesorteditems
urlunsplit)	urlkeyvalschemenetlocpathqueryfragment
query_dicts	            K/var/www/html/env/lib/python3.13/site-packages/rest_framework/utils/urls.pyreplace_query_paramr      sx    
 /4nnYs^.L+VT(>J"+C.!1Jy~OOF:#3#3#56dCEVT(CDD    c                     [         R                  " [        U 5      5      u  p#pEn[         R                  " USS9nUR	                  US5        [         R
                  " [        UR                  5       5      SS9n[         R                  " X#XEU45      $ )zl
Given a URL and a key/val pair, remove an item in the query
parameters of the URL, and return the new URL.
Tr   Nr   )	r   r
   r   r   popr   r   r   r   )r   r   r   r   r   r   r   r   s           r   remove_query_paramr      sq    
 /4nnYs^.L+VT(>JNN3OOF:#3#3#56dCEVT(CDDr   N)urllibr   django.utils.encodingr   r   r    r   r   <module>r"      s     +	E	Er   