def render(self, obj, name, context):
        """The default field renderer.

        This basic renderer assumes that the object has an attribute with
        the same name as the field, unless a different field is specified
        as a `property_name`.

        The renderer is also passed the context so that it can be
        propagated to the `_render_serializable` method of nested
        resources (or, for example, if you decide to implement attribute
        hiding at the field level instead of at the object level).

        Callable attributes of `obj` will be called to fetch value.
        This is useful for fields computed from lambda functions
        or instance methods.
        """
        if self.value_lambda is not None:
            val = self.value_lambda(obj)
        else:
            attr_name = name
            if self.property_name is not None:
                attr_name = self.property_name
            if isinstance(obj, dict):
                val = obj.get(attr_name, None)
            else:
                val = getattr(obj, attr_name, None)

        if callable(val):
            try:
                val = val()
            except:
                logging.exception("Attempted to call `%s` on obj of type %s.",
                    attr_name, type(obj))
                raise

        return val
The default field renderer.

        This basic renderer assumes that the object has an attribute with
        the same name as the field, unless a different field is specified
        as a `property_name`.

        The renderer is also passed the context so that it can be
        propagated to the `_render_serializable` method of nested
        resources (or, for example, if you decide to implement attribute
        hiding at the field level instead of at the object level).

        Callable attributes of `obj` will be called to fetch value.
        This is useful for fields computed from lambda functions
        or instance methods.