code: def render_region_tools(context, feincms_object, region, request=None):
      
  
      if context.get('standalone', False) or not feincms_object:
          return {}
  
      edit = False
  
      if getattr(settings, 'LEONARDO_USE_PAGE_ADMIN', False):
          request = context.get('request', None)
          frontend_edit = request.COOKIES.get(
              'frontend_editing', False)
          if frontend_edit:
              edit = True
  
      return {
          'edit': edit,
          'feincms_object': feincms_object,
          'region': region,
          'region_name': get_page_region(region),
          'widget_add_url': reverse_lazy(
              'widget_create',
              args=[feincms_object.id,
                    region,
                    '%s.%s' % (feincms_object._meta.app_label,
                               feincms_object.__class__.__name__)
                    ])
      }
docs: {% render_region_tools feincms_page "main" request %}
  
      skip rendering in standalone mode