(self, attrname, cls)
Records the class that owns this field.

        This implementation also registers the owning class by this constant
        field's value, so that `DataObject.subclass_with_constant_field()`
        will find this field's class.
Records the class that owns this field.
Records the class that owns this field .
def install(self, attrname, cls):
        """Records the class that owns this field.

        This implementation also registers the owning class by this constant
        field's value, so that `DataObject.subclass_with_constant_field()`
        will find this field's class.

        """
        super(Constant, self).install(attrname, cls)

        # Register class by this field.
        cf = remoteobjects.dataobject.classes_by_constant_field
        attrname, value = self.attrname, self.value
        if attrname not in cf:
            cf[attrname] = dict()
        cf[attrname][value] = cls.__name__
def install ( self , attrname , cls ) : super ( Constant , self ) . install ( attrname , cls ) # Register class by this field. cf = remoteobjects . dataobject . classes_by_constant_field attrname , value = self . attrname , self . value if attrname not in cf : cf [ attrname ] = dict ( ) cf [ attrname ] [ value ] = cls . __name__