Files
authentik/authentik/api/views.py
Jens L 8949464294 root: reformat with latest black version and fix tests (#8376)
* format files

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix pyright

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* revert #8367

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* sigh

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
2024-01-31 15:24:45 +01:00

21 lines
511 B
Python

"""General API Views"""
from typing import Any
from django.urls import reverse
from django.views.generic import TemplateView
class APIBrowserView(TemplateView):
"""Show browser view based on rapi-doc"""
template_name = "api/browser.html"
def get_context_data(self, **kwargs: Any) -> dict[str, Any]:
path = self.request.build_absolute_uri(
reverse(
"authentik_api:schema",
)
)
return super().get_context_data(path=path, **kwargs)