class Integration:
    def __init__(self, env):
        """
        :type env: webassets.Environment
        """
        self.env = env

    def asset_url(self, bundle_name):
        """
        :type bundle_name: str
        """
        return self.env[bundle_name].urls()[0]

    def register(self, app):
        app.jinja_env.globals.update(asset_url=self.asset_url)


class Integration:
    def __init__(self, env):
        """
        :type env: webassets.Environment
        """
        self.env = env

    def asset_url(self, bundle_name):
        """
        :type bundle_name: str
        """
        urls = self.env[bundle_name].urls()
        return "/{}".format(urls[0])  # /{} to make url absolute

    def register(self, app):
        app.jinja_env.globals.update(asset_url=self.asset_url)


Prepend '/' to urls gotten from asset_url() to make them absolute. This fixes /projects/* documentation not displaying correctly.
Prepend '/' to urls gotten from asset_url() to make them absolute. This fixes /projects/* documentation not displaying correctly.

  class Integration:
      def __init__(self, env):
          """
          :type env: webassets.Environment
          """
          self.env = env
  
      def asset_url(self, bundle_name):
          """
          :type bundle_name: str
          """
-         return self.env[bundle_name].urls()[0]
+         urls = self.env[bundle_name].urls()
+         return "/{}".format(urls[0])  # /{} to make url absolute
  
      def register(self, app):
          app.jinja_env.globals.update(asset_url=self.asset_url)
  
  
Prepend '/' to urls gotten from asset_url() to make them absolute. This fixes /projects/* documentation not displaying correctly.
## Code Before:
class Integration:
    def __init__(self, env):
        """
        :type env: webassets.Environment
        """
        self.env = env

    def asset_url(self, bundle_name):
        """
        :type bundle_name: str
        """
        return self.env[bundle_name].urls()[0]

    def register(self, app):
        app.jinja_env.globals.update(asset_url=self.asset_url)


## Instruction:
Prepend '/' to urls gotten from asset_url() to make them absolute. This fixes /projects/* documentation not displaying correctly.
## Code After:
class Integration:
    def __init__(self, env):
        """
        :type env: webassets.Environment
        """
        self.env = env

    def asset_url(self, bundle_name):
        """
        :type bundle_name: str
        """
        urls = self.env[bundle_name].urls()
        return "/{}".format(urls[0])  # /{} to make url absolute

    def register(self, app):
        app.jinja_env.globals.update(asset_url=self.asset_url)

