REST-API mit djangorestframework (init)
This commit is contained in:
@@ -12,6 +12,7 @@ und für die öffentliche Rechercheplattform.
|
||||
- Verlage
|
||||
- Nutzungsrechte und ihre Inhaber*innen
|
||||
- Versionierung
|
||||
- REST-API
|
||||
|
||||
## Abhängigkeiten
|
||||
|
||||
@@ -20,6 +21,7 @@ und für die öffentliche Rechercheplattform.
|
||||
- django-taggit
|
||||
- django-taggit-helpers (uralt, funktioniert aber)
|
||||
- django-simple-history
|
||||
- djangorestframework
|
||||
- PyYAML
|
||||
|
||||
## Installation
|
||||
@@ -28,6 +30,8 @@ Siehe [docs/README.md](docs/README.md)
|
||||
|
||||
## TODO
|
||||
|
||||
- Modelle für Lieder
|
||||
- Modelle für Liederbücher (nach `sources.yaml`, BibTeX-kompatibel) und Sammlungen
|
||||
- Modelle für Verlage/Veröffentlicher und Nutzungsrechte
|
||||
- REST-API
|
||||
- andere Medien als Quellen (URLs, Tonträger)
|
||||
- öffentliche Schnittstelle (Website; bisher nur Backend = Django-Admin)
|
||||
|
||||
@@ -45,6 +45,7 @@ INSTALLED_APPS = [
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'simple-history',
|
||||
'rest_framework',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
@@ -77,6 +78,13 @@ TEMPLATES = [
|
||||
|
||||
WSGI_APPLICATION = 'liederquelle.wsgi.application'
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
# Use Django's standard `django.contrib.auth` permissions,
|
||||
# or allow read-only access for unauthenticated users.
|
||||
"DEFAULT_PERMISSION_CLASSES": [
|
||||
"rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly"
|
||||
]
|
||||
}
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/6.0/ref/settings/#databases
|
||||
|
||||
@@ -20,4 +20,5 @@ from django.urls import path
|
||||
urlpatterns = [
|
||||
#path("quellen/", include("quellen.urls")),
|
||||
path('admin/', admin.site.urls),
|
||||
path('api-auth/', include('rest_framework.urls')),
|
||||
]
|
||||
|
||||
@@ -6,3 +6,4 @@ django-dotenv
|
||||
django-taggit
|
||||
django-taggit-helpers
|
||||
django-simple-history
|
||||
djangorestframework
|
||||
|
||||
Reference in New Issue
Block a user