Prevent write actions on read-only tables.

        Raises:
            WriteNotSupportedError: If models.sf_access is ``read_only``.

def db_for_write(self, model, **hints):
        """
        Prevent write actions on read-only tables.

        Raises:
            WriteNotSupportedError: If models.sf_access is ``read_only``.

        """
        try:
            if model.sf_access == READ_ONLY:
                raise WriteNotSupportedError("%r is a read-only model." % model)
        except AttributeError:
            pass
        return None