ó
pÁìVc           @  sÓ  d  d l  m Z d  d l m Z d  d l m Z m Z d  d l m Z m	 Z	 m
 Z
 m Z d  d l m Z d  d l m Z d  d l m Z d  d l m Z d  d	 l m Z d  d
 l m Z d  d l m Z m Z m Z m Z m Z d  d l  m! Z! d  d l" m# Z# d e j$ f d „  ƒ  YZ% d e& f d „  ƒ  YZ' d, Z( d e f d „  ƒ  YZ) d e) f d  „  ƒ  YZ* d! e) f d" „  ƒ  YZ+ d# e) f d$ „  ƒ  YZ, d% e, f d& „  ƒ  YZ- d' e) f d( „  ƒ  YZ. d) e f d* „  ƒ  YZ/ d+ S(-   iÿÿÿÿ(   t   unicode_literals(   t   OrderedDict(   t   ImproperlyConfiguredt   ObjectDoesNotExist(   t   NoReverseMatcht   Resolver404t   get_script_prefixt   resolve(   t   Manager(   t   QuerySet(   t   six(   t
   smart_text(   t   parse(   t   ugettext_lazy(   t   Fieldt   emptyt   get_attributet   is_simple_callablet   iter_options(   t   reverse(   t   htmlt	   Hyperlinkc           B  s&   e  Z d  Z d „  Z d „  Z e Z RS(   uÇ   
    A string like object that additionally has an associated name.
    We use this for hyperlinked URLs that may render as a named link
    in some contexts, or render as a plain URL in others.
    c         C  s"   t  j j |  | ƒ } | | _ | S(   N(   R
   t	   text_typet   __new__t   name(   t   selft   urlR   t   ret(    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyR      s    	c         C  s   t  |  ƒ |  j f S(   N(   t   strR   (   R   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyt   __getnewargs__#   s    (   t   __name__t
   __module__t   __doc__R   R   t   Truet   is_hyperlink(    (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyR      s   		t   PKOnlyObjectc           B  s   e  Z d  Z d „  Z RS(   uÜ   
    This is a mock object, used for when we only need the pk of the object
    instance, but still want to return an object with a .pk attribute,
    in order to keep the same interface as a regular model instance.
    c         C  s   | |  _  d  S(   N(   t   pk(   R   R$   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyt   __init__/   s    (   R   R   R    R%   (    (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyR#   )   s   u	   read_onlyu
   write_onlyu   requiredu   defaultu   initialu   sourceu   labelu	   help_textu   styleu   error_messagesu   allow_emptyt   RelatedFieldc           B  s˜   e  Z d Z d  Z e d ƒ Z d „  Z d „  Z e	 d „  ƒ Z
 e d „ Z d „  Z d „  Z d „  Z e d	 „  ƒ Z e d
 „  ƒ Z d „  Z d „  Z RS(   iè  u   More than {count} items...c         K  sÝ   | j  d |  j ƒ |  _ | j  d |  j ƒ |  _ | j  d |  j ƒ |  _ |  j d  k	 su | j d d  ƒ su t d ƒ ‚ |  j d  k	 o“ | j d d  ƒ s£ t d ƒ ‚ | j  d d  ƒ | j  d d  ƒ t t |  ƒ j	 |   d  S(	   Nu   querysetu   html_cutoffu   html_cutoff_textu	   read_onlyuM   Relational field must provide a `queryset` argument, or set read_only=`True`.uZ   Relational fields should not provide a `queryset` argument, when setting read_only=`True`.u   manyu   allow_empty(
   t   popt   querysett   html_cutofft   html_cutoff_textt   Nonet   gett   AssertionErrort   superR&   R%   (   R   t   kwargs(    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyR%   @   s    $	%	c         O  s>   | j  d t ƒ r" |  j | | Ž  St t |  ƒ j |  | | Ž S(   Nu   many(   R'   t   Falset	   many_initR.   R&   R   (   t   clst   argsR/   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyR   P   s    c         O  sT   i |  | | Ž  d 6} x1 | j  ƒ  D]# } | t k r# | | | | <q# q# Wt |   S(   uX  
        This method handles creating a parent `ManyRelatedField` instance
        when the `many=True` keyword argument is passed.

        Typically you won't need to override this method.

        Note that we're over-cautious in passing most arguments to both parent
        and child classes in order to try to cover the general case. If you're
        overriding this method you'll probably want something much simpler, eg:

        @classmethod
        def many_init(cls, *args, **kwargs):
            kwargs['child'] = cls()
            return CustomManyRelatedField(*args, **kwargs)
        u   child_relation(   t   keyst   MANY_RELATION_KWARGSt   ManyRelatedField(   R2   R3   R/   t   list_kwargst   key(    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyR1   W   s
    c         C  s+   | d k r d  } n  t t |  ƒ j | ƒ S(   Nu    (   R+   R.   R&   t   run_validation(   R   t   data(    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyR9   n   s    	c         C  s1   |  j  } t | t t f ƒ r- | j ƒ  } n  | S(   N(   R(   t
   isinstanceR	   R   t   all(   R   R(   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyt   get_querysett   s    	c         C  s   t  S(   N(   R0   (   R   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyt   use_pk_only_optimization€   s    c         C  s”   |  j  ƒ  r„ |  j r„ yX t | |  j d  ƒ } | j |  j d ƒ } t | ƒ r_ | ƒ  j } n  t d | ƒ SWq„ t k
 r€ q„ Xn  t | |  j ƒ S(   NiÿÿÿÿR$   (   R>   t   source_attrsR   t   serializable_valueR   R$   R#   t   AttributeError(   R   t   instancet   value(    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyR   ƒ   s    c         C  sZ   |  j  ƒ  } | d  k r i  St g  | D]- } t j |  j | ƒ ƒ |  j | ƒ f ^ q& ƒ S(   N(   R=   R+   R   R
   R   t   to_representationt   display_value(   R   R(   t   item(    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyt   choices”   s    c         C  s   |  j  S(   N(   RG   (   R   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyt   grouped_choices¤   s    c         C  s   t  |  j d |  j d |  j ƒS(   Nt   cutofft   cutoff_text(   R   RH   R)   R*   (   R   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyR   ¨   s    		c         C  s   t  j | ƒ S(   N(   R
   R   (   R   RB   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyRE   ¯   s    N(   R   R   R+   R(   R)   t   _R*   R%   R   t   classmethodR1   R   R9   R=   R>   R   t   propertyRG   RH   R   RE   (    (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyR&   ;   s   						t   StringRelatedFieldc           B  s    e  Z d  Z d „  Z d „  Z RS(   ud   
    A read only field that represents its targets using their
    plain string representation.
    c         K  s$   t  | d <t t |  ƒ j |   d  S(   Nu	   read_only(   R!   R.   RN   R%   (   R   R/   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyR%   ¹   s    
c         C  s   t  j | ƒ S(   N(   R
   R   (   R   RC   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyRD   ½   s    (   R   R   R    R%   RD   (    (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyRN   ³   s   	t   PrimaryKeyRelatedFieldc           B  sY   e  Z i e d  ƒ d 6e d ƒ d 6e d ƒ d 6Z d „  Z d „  Z d „  Z d	 „  Z RS(
   u   This field is required.u   requiredu0   Invalid pk "{pk_value}" - object does not exist.u   does_not_existu8   Incorrect type. Expected pk value, received {data_type}.u   incorrect_typec         K  s/   | j  d d  ƒ |  _ t t |  ƒ j |   d  S(   Nu   pk_field(   R'   R+   t   pk_fieldR.   RO   R%   (   R   R/   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyR%   È   s    c         C  s   t  S(   N(   R!   (   R   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyR>   Ì   s    c         C  s›   |  j  d  k	 r$ |  j  j | ƒ } n  y |  j ƒ  j d | ƒ SWnV t k
 rd |  j d d | ƒn3 t t f k
 r– |  j d d t	 | ƒ j
 ƒn Xd  S(   NR$   u   does_not_existt   pk_valueu   incorrect_typet	   data_type(   RP   R+   t   to_internal_valueR=   R,   R   t   failt	   TypeErrort
   ValueErrort   typeR   (   R   R:   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyRS   Ï   s    c         C  s)   |  j  d  k	 r" |  j  j | j ƒ S| j S(   N(   RP   R+   RD   R$   (   R   RC   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyRD   Ù   s    (   R   R   RK   t   default_error_messagesR%   R>   RS   RD   (    (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyRO   Á   s   			
t   HyperlinkedRelatedFieldc           B  s   e  Z d  Z d Z i e d ƒ d 6e d ƒ d 6e d ƒ d 6e d ƒ d 6e d	 ƒ d
 6Z d d „ Z d „  Z d „  Z	 d „  Z
 d „  Z d „  Z d „  Z RS(   u   pku   This field is required.u   requiredu!   Invalid hyperlink - No URL match.u   no_matchu(   Invalid hyperlink - Incorrect URL match.u   incorrect_matchu*   Invalid hyperlink - Object does not exist.u   does_not_existu:   Incorrect type. Expected URL string, received {data_type}.u   incorrect_typec         K  s›   | d  k	 r | |  _ n  |  j d  k	 s3 t d ƒ ‚ | j d |  j ƒ |  _ | j d |  j ƒ |  _ | j d d  ƒ |  _ t |  _ t t	 |  ƒ j
 |   d  S(   Nu%   The `view_name` argument is required.u   lookup_fieldu   lookup_url_kwargu   format(   R+   t	   view_nameR-   R'   t   lookup_fieldt   lookup_url_kwargt   formatR   R.   RY   R%   (   R   RZ   R/   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyR%   ë   s    	c         C  s   |  j  d k S(   Nu   pk(   R[   (   R   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyR>   ú   s    c         C  s0   | |  j  } i | |  j 6} |  j ƒ  j |   S(   uÌ   
        Return the object corresponding to a matched URL.

        Takes the matched URL conf arguments, and should return an
        object instance, or raise an `ObjectDoesNotExist` exception.
        (   R\   R[   R=   R,   (   R   RZ   t	   view_argst   view_kwargst   lookup_valuet   lookup_kwargs(    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyt
   get_objectý   s    c      	   C  sc   t  | d ƒ r" | j d k r" d St | |  j ƒ } i | |  j 6} |  j | d | d | d | ƒS(   uã   
        Given an object, return the URL that hyperlinks to the object.

        May raise a `NoReverseMatch` if the `view_name` and `lookup_field`
        attributes are not configured to correctly match the URL conf.
        u   pkR/   t   requestR]   N(   t   hasattrR$   R+   t   getattrR[   R\   R   (   R   t   objRZ   Rc   R]   R`   R/   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyt   get_url  s
    c         C  s   t  j | ƒ S(   N(   R
   R   (   R   Rf   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyt   get_name  s    c         C  sy  |  j  j d d  ƒ } y | j d
 ƒ } Wn- t k
 rW |  j d d t | ƒ j ƒn X| r¢ t j | ƒ j	 } t
 ƒ  } | j | ƒ r¢ d | t | ƒ } q¢ n  y t | ƒ } Wn t k
 rÒ |  j d ƒ n Xy | j j |  j | ƒ } Wn t k
 r|  j } n X| j | k r+|  j d ƒ n  y  |  j | j | j | j ƒ SWn' t t t f k
 rt|  j d	 ƒ n Xd  S(   Nu   requestu   http:u   https:u   incorrect_typeRR   u   /u   no_matchu   incorrect_matchu   does_not_exist(   u   http:u   https:(   t   contextR,   R+   t
   startswithRA   RT   RW   R   t   urlparset   pathR   t   lenR   R   t   versioning_schemet   get_versioned_viewnameRZ   Rb   R3   R/   R   RU   RV   (   R   R:   Rc   t   http_prefixt   prefixt   matcht   expected_viewname(    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyRS     s2     		 c         C  s#  |  j  j d d  ƒ } |  j  j d d  ƒ } | d  k	 sL t d |  j j ƒ ‚ | rv |  j rv |  j | k rv |  j } n  y |  j | |  j | | ƒ } Wn_ t	 k
 rö d } | d	 k rà i d d 6d d  6| } | d | 7} n  t
 | |  j ƒ ‚ n X| d  k rd  S|  j | ƒ } t | | ƒ S(
   Nu   requestu   formatuz   `%s` requires the request in the serializer context. Add `context={'request': request}` when instantiating the serializer.uÌ   Could not resolve URL for hyperlinked relationship using view name "%s". You may have failed to include the related model in your API, or incorrectly configured the `lookup_field` attribute on this field.u    u   the empty stringu   Noneu}    WARNING: The value of the field on the model instance was %s, which may be why it didn't match any entries in your URL conf.(   u    N(   Ri   R,   R+   R-   t	   __class__R   R]   Rg   RZ   R   R   Rh   R   (   R   RC   Rc   R]   R   t   msgt   value_stringR   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyRD   <  s*    N(   R   R   R[   R+   RZ   RK   RX   R%   R>   Rb   Rg   Rh   RS   RD   (    (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyRY   ß   s   					"t   HyperlinkedIdentityFieldc           B  s#   e  Z d  Z d d „ Z d „  Z RS(   uÉ   
    A read-only field that represents the identity URL for an object, itself.

    This is in contrast to `HyperlinkedRelatedField` which represents the
    URL of relationships to other objects.
    c         K  sI   | d  k	 s t d ƒ ‚ t | d <d | d <t t |  ƒ j | |  d  S(   Nu%   The `view_name` argument is required.u	   read_onlyu   *u   source(   R+   R-   R!   R.   Rw   R%   (   R   RZ   R/   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyR%   t  s    

c         C  s   t  S(   N(   R0   (   R   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyR>   z  s    N(   R   R   R    R+   R%   R>   (    (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyRw   l  s   t   SlugRelatedFieldc           B  sL   e  Z d  Z i e d ƒ d 6e d ƒ d 6Z d d „ Z d „  Z d „  Z RS(	   um   
    A read-write field that represents the target of the relationship
    by a unique 'slug' attribute.
    u/   Object with {slug_name}={value} does not exist.u   does_not_existu   Invalid value.u   invalidc         K  s;   | d  k	 s t d ƒ ‚ | |  _ t t |  ƒ j |   d  S(   Nu&   The `slug_field` argument is required.(   R+   R-   t
   slug_fieldR.   Rx   R%   (   R   Ry   R/   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyR%   ‹  s    	c         C  s~   y! |  j  ƒ  j i | |  j 6  SWnV t k
 rV |  j d d |  j d t | ƒ ƒn$ t t f k
 ry |  j d ƒ n Xd  S(   Nu   does_not_existt	   slug_nameRC   u   invalid(   R=   R,   Ry   R   RT   R   RU   RV   (   R   R:   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyRS     s    !%c         C  s   t  | |  j ƒ S(   N(   Re   Ry   (   R   Rf   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyRD   ˜  s    N(	   R   R   R    RK   RX   R+   R%   RS   RD   (    (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyRx   €  s   	R6   c           B  s£   e  Z d  Z g  Z g  Z i e d ƒ d 6e d ƒ d 6Z d Z e d ƒ Z d d „ Z
 d „  Z d	 „  Z d
 „  Z d „  Z e d „  ƒ Z e d „  ƒ Z d „  Z RS(   uÏ  
    Relationships with `many=True` transparently get coerced into instead being
    a ManyRelatedField with a child relationship.

    The `ManyRelatedField` class is responsible for handling iterating through
    the values and passing each one to the child relationship.

    This class is treated as private API.
    You shouldn't generally need to be using this class directly yourself,
    and should instead simply set 'many=True' on the relationship.
    u5   Expected a list of items but got type "{input_type}".u
   not_a_listu   This list may not be empty.u   emptyiè  u   More than {count} items...c         O  sœ   | |  _  | j d t ƒ |  _ | j d |  j ƒ |  _ | j d |  j ƒ |  _ | d  k	 sf t d ƒ ‚ t t	 |  ƒ j
 | | Ž  |  j  j d d d |  ƒ d  S(   Nu   allow_emptyu   html_cutoffu   html_cutoff_textu(   `child_relation` is a required argument.t
   field_nameu    t   parent(   t   child_relationR'   R!   t   allow_emptyR)   R*   R+   R-   R.   R6   R%   t   bind(   R   R}   R3   R/   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyR%   ±  s    	c         C  s]   t  j | ƒ rJ |  j | k r: t |  j d t ƒ r: t Sn  | j |  j ƒ S| j |  j t ƒ S(   Nu   partial(	   R   t   is_html_inputR{   Re   t   rootR0   R   t   getlistR,   (   R   t
   dictionary(    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyt	   get_value»  s    c         C  s“   t  | t d ƒ ƒ s% t | d ƒ rD |  j d d t | ƒ j ƒn  |  j rp t | ƒ d k rp |  j d ƒ n  g  | D] } |  j j | ƒ ^ qw S(   Nu    u   __iter__u
   not_a_listt
   input_typei    u   empty(	   R;   RW   Rd   RT   R   R~   Rm   R}   RS   (   R   R:   RF   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyRS   Ç  s    %c         C  sQ   t  | d ƒ r" | j d  k r" g  St | |  j ƒ } t  | d ƒ rM | j ƒ  S| S(   Nu   pku   all(   Rd   R$   R+   R   R?   R<   (   R   RB   t   relationship(    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyR   Ò  s    c         C  s#   g  | D] } |  j  j | ƒ ^ q S(   N(   R}   RD   (   R   t   iterableRC   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyRD   Ú  s    c         C  s
   |  j  j S(   N(   R}   RG   (   R   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyRG   à  s    c         C  s   |  j  S(   N(   RG   (   R   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyRH   ä  s    c         C  s   t  |  j d |  j d |  j ƒS(   NRI   RJ   (   R   RH   R)   R*   (   R   (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyR   è  s    		N(   R   R   R    t   initialt   default_empty_htmlRK   RX   R)   R*   R+   R%   R„   RS   R   RD   RM   RG   RH   R   (    (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyR6   œ  s    
				N(   u	   read_onlyu
   write_onlyu   requiredu   defaultu   initialu   sourceu   labelu	   help_textu   styleu   error_messagesu   allow_empty(0   t
   __future__R    t   collectionsR   t   django.core.exceptionsR   R   t   django.core.urlresolversR   R   R   R   t   django.db.modelsR   t   django.db.models.queryR	   t   django.utilsR
   t   django.utils.encodingR   t   django.utils.six.moves.urllibR   Rk   t   django.utils.translationR   RK   t   rest_framework.fieldsR   R   R   R   R   t   rest_framework.reverseR   t   rest_framework.utilsR   R   R   t   objectR#   R5   R&   RN   RO   RY   Rw   Rx   R6   (    (    (    sr   /opt/seafile/seafile-server-5.1.3/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/relations.pyt   <module>   s.   "( x