data link naar backend #11

Merged
mark merged 4 commits from mark into master 2025-07-15 17:36:36 +02:00
3 changed files with 13 additions and 1 deletions
Showing only changes of commit 902243b969 - Show all commits
+9 -1
View File
@@ -29,6 +29,7 @@ INSTALLED_APPS = [
'django_htmx',
'rest_framework',
'corsheaders',
'drf_spectacular',
]
MIDDLEWARE = [
@@ -97,7 +98,14 @@ REST_FRAMEWORK = {
],
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.IsAuthenticated',
]
],
'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',
}
SPECTACULAR_SETTINGS = {
'TITLE': 'HDcon Muzak',
'DESCRIPTION': 'Gewoon een leuk tooltje om samen met je vrienden een muzieklijst samen te stellen.',
'VERSION': '1.0.0',
}
OIDC_RP_CLIENT_ID = os.getenv('OIDC_RP_CLIENT_ID')
+3
View File
@@ -2,10 +2,13 @@ from django.urls import path
from . import views
from django.conf import settings
from django.conf.urls.static import static
from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView
urlpatterns = [
### API
path('api/', views.api_root, name="api-root"),
path('api/schema/', SpectacularAPIView.as_view(), name='schema'),
path('api/schema/swagger-ui/', SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'),
path('api/track/', views.TrackListView.as_view(), name="api-tracks"),
path('api/track/<id>', views.TrackDetailView.as_view(), name="api-track"),
path('api/artist/<id>', views.ArtistDetailView.as_view(), name="api-artist"),
+1
View File
@@ -10,3 +10,4 @@ djangorestframework
markdown
PyYAML
Pygments
drf-spectacular