def __set__(self, obj, value):
        # The OGC Geometry type of the field.
        gtype = self._field.geom_type
        
        # The geometry type must match that of the field -- unless the
        # general GeometryField is used.
        if isinstance(value, self._klass) and (str(value.geom_type).upper() == gtype or gtype == 'GEOMETRY'):
            # Assigning the SRID to the geometry.
            if value.srid is None: value.srid = self._field.srid
        elif isinstance(value, (NoneType, StringType, UnicodeType)):
            # Set with None, WKT, or HEX
            pass
        else:
            raise TypeError('cannot set %s GeometryProxy with value of type: %s' % (obj.__class__.__name__, type(value)))

        # Setting the objects dictionary with the value, and returning.
        obj.__dict__[self._field.attname] = value 
        return value
This accessor sets the proxied geometry with the geometry class
dataset/ETHPy150Open CollabQ/CollabQ/vendor/django/contrib/gis/db/models/proxy.py/GeometryProxy.__set__