Skip to content

Commit

Permalink
chore!: remove Django admin interface (was debug only)
Browse files Browse the repository at this point in the history
This isn't used and provides a potential security hole, and probably
will not play nice with the Bento authorization scheme.
  • Loading branch information
davidlougheed committed Sep 17, 2024
1 parent 5a3da67 commit 93eb6b6
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 92 deletions.
13 changes: 0 additions & 13 deletions chord_metadata_service/chord/admin.py

This file was deleted.

20 changes: 0 additions & 20 deletions chord_metadata_service/metadata/urls.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,12 @@
"""metadata URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from chord_metadata_service.restapi import api_views, urls as restapi_urls
from chord_metadata_service.chord import urls as chord_urls
from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView

# TODO: django.conf.settings breaks reverse(), how to import properly?
from .settings import DEBUG

urlpatterns = [
path('api/', include(restapi_urls)),
path('service-info', api_views.service_info, name="service-info"),
*chord_urls.urlpatterns, # TODO: Use include? can we double up?
*([path('admin/', admin.site.urls)] if DEBUG else []),
# OpenAPI 3 documentation with Swagger UI
path('schema/', SpectacularAPIView.as_view(), name="schema"),
path('', SpectacularSwaggerView.as_view(), name="swagger-ui"),
Expand Down
9 changes: 0 additions & 9 deletions chord_metadata_service/patients/admin.py

This file was deleted.

42 changes: 0 additions & 42 deletions chord_metadata_service/phenopackets/admin.py

This file was deleted.

8 changes: 0 additions & 8 deletions chord_metadata_service/resources/admin.py

This file was deleted.

0 comments on commit 93eb6b6

Please sign in to comment.