code: def resource(resource_id):
      
      resource_obj = app.db.resource(resource_id)
  
      if 'raw' in request.args:
          return send_from_directory(os.path.dirname(resource_obj.path),
                                     os.path.basename(resource_obj.path))
  
      return render_template('resource.html', resource=resource_obj)
docs: Show a resource.