Skip to content
Snippets Groups Projects
Commit 122cce0e authored by Timothee P's avatar Timothee P :sunflower:
Browse files

feat(sentry): deplacement de l'url de vérification dans api

Il y a une redirection à la base du domaine qui ne permet pas de se rendre sur la page sans avoir une erreur 404
parent b28c391f
Branches
Tags
1 merge request!535REDMINE_ISSUE-26581 | Brancher GC à Sentry
Pipeline #41701 passed
......@@ -58,6 +58,10 @@ from drf_yasg import openapi
from rest_framework import permissions
# To verify Sentry installation
def trigger_error(request):
division_by_zero = 1 / 0
schema_view = get_schema_view(
openapi.Info(
title="Documentation REST APIs GéoContrib",
......@@ -92,6 +96,8 @@ router.register(r'project-types', ProjectTypesViewDeprecated, basename='projects
urlpatterns = [
# Include Sentry URL to verify installation
path('sentry-debug/', trigger_error),
# Include DRF-Swagger URLs
path('swagger<format>/', schema_view.without_ui(cache_timeout=0), name='schema-json'),
path('swagger/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
......
......@@ -6,15 +6,9 @@ from geocontrib.views import FeatureTypeDetail
from geocontrib.views import view404
from geocontrib.views import protected_serve
# To verify Sentry installation
def trigger_error(request):
division_by_zero = 1 / 0
app_name = 'geocontrib'
urlpatterns = [
# Include Sentry URL to verify installation
path('sentry-debug/', trigger_error),
# Get the media files path to register routes towards it and control if the requested files can be viewed by current user
path('media/<path:path>', protected_serve, {'document_root': settings.MEDIA_ROOT}),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment