Coverage for app/urls.py: 100%

1 import plain.oauth.urls

2 from plain.auth.views import AuthViewMixin, LogoutView

3 from plain.oauth.providers import get_provider_keys

4 from plain.urls import include, path

5 from plain.views import TemplateView

6

7

8 class LoggedInView(AuthViewMixin, TemplateView):

9 template_name = "index.html"

10

11 def get_template_context(self):

12 context = super().get_template_context()

13 context["oauth_provider_keys"] = get_provider_keys()

14 return context

15

16

17 class LoginView(TemplateView):

18 template_name = "login.html"

19

20

21 urlpatterns = [

22 path("oauth/", include(plain.oauth.urls)),

23 path("login/", LoginView, name="login"),

24 path("logout/", LogoutView, name="logout"),

25 path("", LoggedInView),

26]