code: def static_url(context, static_file_path):
      
      app = context['app']
      try:
          static_url = app['static_root_url']
      except KeyError:
          raise RuntimeError(
              "app does not define a static root url "
              "'static_root_url', you need to set the url root "
              "with app['static_root_url'] = '<static root>'.") from None
      return '{}/{}'.format(static_url.rstrip('/'), static_file_path.lstrip('/'))
docs: Filter for generating urls for static files.
  
      NOTE: you'll need
      to set app['static_root_url'] to be used as the root for the urls returned.
  
      Usage: {{ static('styles.css') }} might become
      "/static/styles.css" or "http://mycdn.example.com/styles.css"