
    &g                     v    	 d dl mZ d dlmZ d dlmZ  G d dej                        Z	y# e$ r	 d dlmZ Y /w xY w)    )unquote)forms)Bookmarkc                   F     e Zd ZdZ fdZd Z fdZ G d d      Z xZS )BookmarkFormz
    This form allows users to edit bookmarks. It doesn't show the user field.
    It expects the user to be passed in from the view.
    c                 :    t        t        | 
  |i | || _        y )N)superr   __init__user)selfr   argskwargs	__class__s       O/var/www/html/djangosite/lib/python3.12/site-packages/admin_tools/menu/forms.pyr
   zBookmarkForm.__init__   s    lD*D;F;	    c                 6    | j                   d   }t        |      S )Nurl)cleaned_datar   )r   r   s     r   	clean_urlzBookmarkForm.clean_url   s    &s|r   c                 t    t        t        | 
  |ddi|}| j                  |_        |j                          |S )NcommitF)r	   r   saver   )r   r   r   bookmarkr   s       r   r   zBookmarkForm.save   sD    t1

 

 		r   c                       e Zd ZdZeZy)BookmarkForm.Meta)r   titleN)__name__
__module____qualname__fieldsr   model r   r   Metar   $   s    !r   r#   )	r   r   r   __doc__r
   r   r   r#   __classcell__)r   s   @r   r   r      s!    
 r   r   N)
urllib.parser   ImportErrorurllibdjangor   admin_tools.menu.modelsr   	ModelFormr   r"   r   r   <module>r,      s9   $
  ,5??   s   * 88