master
.I have multiple endpoints and admin panel. I want my endpoints to be in root path of /api/v1/
, but admin to be just /admin/
. So, I added app_configs["root_path"] = f"/api/v{settings.APP_VERSION}"
, and admin panel breaks down.
app_configs: dict[str, Any] = {"title": "Itinerago API"}
app_configs["root_path"] = f"/api/v{settings.APP_VERSION}"
app = FastAPI(**app_configs)
app.include_router(auth_router, prefix="/auth", tags=["Auth"])
app.include_router(core_router, prefix="", tags=["Main Logic"])
admin = Admin(app, engine)
# admin.add_view-s here
Commenting out second line fixes admin, however, it does not give desired output.
APIs will have /api/v1/
prefix, but, admin will not. Admin will load without a problem.
Admin breaks down completely:
and
Links are also broken:
In the first image, when you click one of the models it goes to: /api/v1/admin/model/list
No response
Windows, Python 3.10, Dockerized Fastapi
sqladmin version 0.12.0
No response
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too