New Functionalities & Addons
This commit is contained in:
1 parent
74fe9c7b90
commit
2f1dac4c09
55 files changed
+4415
-316
No files matched your search
+15
-1
@@ -33,6 +33,9 @@ DEBUG = os.getenv('DEBUG') == 'True'
|
||||
ALLOWED_HOSTS = os.getenv('ALLOWED_HOSTS', 'localhost').split(',')
|
||||
CSRF_TRUSTED_ORIGINS = os.getenv('CSRF_TRUSTED_ORIGINS', '').split(',')
|
||||
|
||||
# JellyFin Application
|
||||
JELLYFIN_URL = os.getenv('JELLYFIN_URL')
|
||||
JELLYFIN_API_KEY = os.getenv('JELLYFIN_API_KEY')
|
||||
|
||||
# Application definition
|
||||
|
||||
@@ -43,11 +46,20 @@ INSTALLED_APPS = [
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'rest_framework',
|
||||
|
||||
'gd',
|
||||
'intern'
|
||||
'intern',
|
||||
'gd2',
|
||||
]
|
||||
|
||||
# Sicherheitseinstellung für öffentliche API
|
||||
REST_FRAMEWORK = {
|
||||
'DEFAULT_PERMISSION_CLASSES': [
|
||||
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly',
|
||||
]
|
||||
}
|
||||
|
||||
MIDDLEWARE = [
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
@@ -77,6 +89,8 @@ TEMPLATES = [
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
|
||||
WSGI_APPLICATION = 'project.wsgi.application'
|
||||
|
||||
|
||||
|
||||
@@ -18,6 +18,9 @@ from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
from django.views.generic import RedirectView
|
||||
|
||||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
|
||||
urlpatterns = [
|
||||
# 1. Das Standard Django-Admin
|
||||
path('admin/', admin.site.urls),
|
||||
@@ -28,7 +31,16 @@ urlpatterns = [
|
||||
# 3. Das öffentliche Genial Daneben Archiv
|
||||
path('gd/', include('gd.urls')),
|
||||
|
||||
# 3. Das öffentliche Genial Daneben Archiv (Neues Webdesign)
|
||||
path('gd2/', include('gd2.urls')),
|
||||
|
||||
# 4. Der "Direkt-Leiter": Wenn man nur die IP/Domain aufruft,
|
||||
# landet man sofort im Archiv.
|
||||
path('', RedirectView.as_view(url='/gd/', permanent=True)),
|
||||
]
|
||||
|
||||
# Füge dies am Ende hinzu, damit Django die static/media Dateien im Debug-Modus findet:
|
||||
if settings.DEBUG:
|
||||
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||
# Falls du auch Media-Dateien (Uploads) lokal testen willst:
|
||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
Reference in new issue
Block a user