docs: def delete_resource(resource_id):
      """Delete a resource."""
      resource_obj = app.db.resource(resource_id)
      try:
          os.remove(resource_obj.path)
      except OSError as err:
          app.logger.debug(err.message)
  
      app.db.delete_resource(resource_id)
      return redirect(request.referrer)