Remove redoc

This commit is contained in:
Alexandre Iooss 2020-02-11 21:25:30 +01:00
parent 698ae42c9d
commit 1b848eede9
3 changed files with 1 additions and 18 deletions

View File

@ -7,7 +7,6 @@ from django.contrib.auth.views import PasswordResetView
from django.urls import include, path
from django.views.generic import RedirectView, TemplateView
from rest_framework import routers
from rest_framework.schemas import get_schema_view
import media.views
import users.views
@ -33,10 +32,6 @@ urlpatterns = [
# REST API
path('api/', include(router.urls)),
path('api-auth/', include('rest_framework.urls')),
path('openapi', login_required(get_schema_view()), name='openapi-schema'),
path('redoc/',
login_required(TemplateView.as_view(template_name='redoc.html')),
name='redoc'),
# Include Django Contrib and Core routers
path('accounts/password_reset/', PasswordResetView.as_view(),

View File

@ -97,7 +97,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<p>
Mediatek 2017-2020 &mdash;
<a href="mailto:club-med@crans.org">Nous contactez</a> &mdash;
<a href="{% url "redoc" %}">Explorer l'API</a>
<a href="{% url "api-root" %}">Explorer l'API</a>
</p>
</div>
{% endif %}

View File

@ -1,12 +0,0 @@
{% extends "base.html" %}
{% comment %}
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% load i18n static %}
{% block coltype %}nopadding{% endblock %}
{% block content %}
<redoc spec-url='{% url "openapi-schema" %}'></redoc>
<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"></script>
{% endblock %}