|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /usr/lib64/python2.7/site-packages/django/db/models/fields/ |
Upload File : |
�
r�\c @ sB d Z d e f d � � YZ d e f d � � YZ d d � Z d S( s
Convenience routines for creating non-trivial Field subclasses, as well as
backwards compatibility utilities.
Add SubfieldBase as the metaclass for your Field subclass, implement
to_python() and the other necessary methods and everything will work
seamlessly.
t SubfieldBasec B s e Z d Z d � Z RS( s�
A metaclass for custom Field subclasses. This ensures the model's attribute
has the descriptor protocol attached to it.
c C s@ t t | � j | | | | � } t | | j d � � | _ | S( Nt contribute_to_class( t superR t __new__t make_contribt getR ( t clst namet basest attrst new_class( ( sE /tmp/pip-install-XxeQeY/django/django/db/models/fields/subclassing.pyR s !( t __name__t
__module__t __doc__R ( ( ( sE /tmp/pip-install-XxeQeY/django/django/db/models/fields/subclassing.pyR
s t Creatorc B s, e Z d Z d � Z d d � Z d � Z RS( sT
A placeholder class that provides a way to set the attribute on the model.
c C s
| | _ d S( N( t field( t selfR ( ( sE /tmp/pip-install-XxeQeY/django/django/db/models/fields/subclassing.pyt __init__ s c C s, | d k r t d � � n | j | j j S( Ns% Can only be accessed via an instance.( t Nonet AttributeErrort __dict__R R ( R t objt type( ( sE /tmp/pip-install-XxeQeY/django/django/db/models/fields/subclassing.pyt __get__ s c C s# | j j | � | j | j j <d S( N( R t to_pythonR R ( R R t value( ( sE /tmp/pip-install-XxeQeY/django/django/db/models/fields/subclassing.pyt __set__"