providers/oauth(minor): fix urls not being mounted in the right path

This commit is contained in:
Langhammer, Jens 2019-10-07 16:57:36 +02:00
parent 15fa7e9652
commit 6a4233d6fd
2 changed files with 7 additions and 6 deletions

View File

@ -9,4 +9,4 @@ class PassbookProviderOAuthConfig(AppConfig):
name = 'passbook.providers.oauth' name = 'passbook.providers.oauth'
label = 'passbook_providers_oauth' label = 'passbook_providers_oauth'
verbose_name = 'passbook Providers.OAuth' verbose_name = 'passbook Providers.OAuth'
mountpoint = 'application/oauth/' mountpoint = ''

View File

@ -1,11 +1,11 @@
"""passbook oauth_provider urls""" """passbook oauth_provider urls"""
from django.urls import path from django.urls import path, include
from oauth2_provider import views from oauth2_provider import views
from passbook.providers.oauth.views import github, oauth2 from passbook.providers.oauth.views import github, oauth2
urlpatterns = [ oauth_urlpatterns = [
# Custom OAuth 2 Authorize View # Custom OAuth 2 Authorize View
path('authorize/', oauth2.PassbookAuthorizationLoadingView.as_view(), path('authorize/', oauth2.PassbookAuthorizationLoadingView.as_view(),
name="oauth2-authorize"), name="oauth2-authorize"),
@ -26,6 +26,7 @@ github_urlpatterns = [
path('user', github.GitHubUserView.as_view(), name='github-user'), path('user', github.GitHubUserView.as_view(), name='github-user'),
] ]
# urlpatterns = [ urlpatterns = [
# path('', include(github_urlpatterns)) path('', include(github_urlpatterns)),
# ] path('application/oauth/', include(oauth_urlpatterns)),
]