-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
22 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
from django.urls import include, path | ||
|
||
urlpatterns = [path("", include("djstripe.urls", namespace="payment"))] | ||
urlpatterns = [path("payment/", include("djstripe.urls", namespace="payment"))] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,27 @@ | ||
# -*- coding: utf-8 -*- | ||
from django.http import HttpResponseRedirect | ||
from django.urls import path | ||
from django.urls import include, path | ||
from django.views.decorators.csrf import csrf_exempt | ||
from graphene_file_upload.django import FileUploadGraphQLView | ||
|
||
from bd_api.apps.api.v1.search_views import DatasetSearchView | ||
from bd_api.apps.api.v1.views import DatasetRedirectView | ||
|
||
|
||
def redirect_to_v1(request): | ||
return HttpResponseRedirect("/api/v1/") | ||
return HttpResponseRedirect("/api/v1/graphql") | ||
|
||
|
||
def redirect_to_v1_graphql(request): | ||
return HttpResponseRedirect("/api/v1/graphql") | ||
def graphql_view(): | ||
return csrf_exempt(FileUploadGraphQLView.as_view(graphiql=True)) | ||
|
||
|
||
urlpatterns = [ | ||
path("", redirect_to_v1), | ||
path("v1/", redirect_to_v1_graphql), | ||
path( | ||
"v1/graphql", | ||
csrf_exempt(FileUploadGraphQLView.as_view(graphiql=True)), | ||
), | ||
path("api/", redirect_to_v1), | ||
path("api/v1/", redirect_to_v1), | ||
path("api/v1/graphql", graphql_view()), | ||
path("search/", DatasetSearchView.as_view()), | ||
path("search/debug/", include("haystack.urls")), | ||
path("dataset/", DatasetRedirectView.as_view()), | ||
path("dataset_redirect/", DatasetRedirectView.as_view()), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters