Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/bazarr/blame/commit/26ce9d73e6b6c4cc1e219deba722c0eaab4b3187/libs/flask_restx/apidoc.py You should set ROOT_URL correctly, otherwise the web may not work correctly.
bazarr/libs/flask_restx/apidoc.py

36 lines
901 B

from flask import url_for, Blueprint, render_template
class Apidoc(Blueprint):
"""
Allow to know if the blueprint has already been registered
until https://github.com/mitsuhiko/flask/pull/1301 is merged
"""
def __init__(self, *args, **kwargs):
self.registered = False
super(Apidoc, self).__init__(*args, **kwargs)
def register(self, *args, **kwargs):
super(Apidoc, self).register(*args, **kwargs)
self.registered = True
apidoc = Apidoc(
"restx_doc",
__name__,
template_folder="templates",
static_folder="static",
static_url_path="/swaggerui",
)
@apidoc.add_app_template_global
def swagger_static(filename):
return url_for("restx_doc.static", filename=filename)
def ui_for(api):
"""Render a SwaggerUI for a given API"""
return render_template("swagger-ui.html", title=api.title, specs_url=api.specs_url)