From 6a4233d6fd807f07bc6079e46a8d96ffb195dbd9 Mon Sep 17 00:00:00 2001 From: "Langhammer, Jens" Date: Mon, 7 Oct 2019 16:57:36 +0200 Subject: [PATCH] providers/oauth(minor): fix urls not being mounted in the right path --- passbook/providers/oauth/apps.py | 2 +- passbook/providers/oauth/urls.py | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/passbook/providers/oauth/apps.py b/passbook/providers/oauth/apps.py index 2974f1223..d1e65a02e 100644 --- a/passbook/providers/oauth/apps.py +++ b/passbook/providers/oauth/apps.py @@ -9,4 +9,4 @@ class PassbookProviderOAuthConfig(AppConfig): name = 'passbook.providers.oauth' label = 'passbook_providers_oauth' verbose_name = 'passbook Providers.OAuth' - mountpoint = 'application/oauth/' + mountpoint = '' diff --git a/passbook/providers/oauth/urls.py b/passbook/providers/oauth/urls.py index 854569116..9fb987efc 100644 --- a/passbook/providers/oauth/urls.py +++ b/passbook/providers/oauth/urls.py @@ -1,11 +1,11 @@ """passbook oauth_provider urls""" -from django.urls import path +from django.urls import path, include from oauth2_provider import views from passbook.providers.oauth.views import github, oauth2 -urlpatterns = [ +oauth_urlpatterns = [ # Custom OAuth 2 Authorize View path('authorize/', oauth2.PassbookAuthorizationLoadingView.as_view(), name="oauth2-authorize"), @@ -26,6 +26,7 @@ github_urlpatterns = [ path('user', github.GitHubUserView.as_view(), name='github-user'), ] -# urlpatterns = [ -# path('', include(github_urlpatterns)) -# ] +urlpatterns = [ + path('', include(github_urlpatterns)), + path('application/oauth/', include(oauth_urlpatterns)), +]