from django.contrib import admin from django.conf import settings from django.conf.urls.static import static from django.http import JsonResponse from django.shortcuts import redirect from django.urls import include, path from vergabe_teilnahme.apps.core import views as core_views from vergabe_teilnahme.apps.preise import views as preise_views def health(request): return JsonResponse({'status': 'ok'}) def home(request): return redirect('ausschreibungen:dashboard') handler404 = 'vergabe_teilnahme.apps.core.views.custom_404' handler500 = 'vergabe_teilnahme.apps.core.views.custom_500' urlpatterns = [ path('admin/', admin.site.urls), path('health/', health), path('', home, name='home'), path('ausschreibungen/', include('vergabe_teilnahme.apps.ausschreibungen.urls', namespace='ausschreibungen')), path('lose/', include('vergabe_teilnahme.apps.lose.urls')), path('aufgaben/', include('vergabe_teilnahme.apps.aufgaben.global_urls')), path('dokumente/', include('vergabe_teilnahme.apps.dokumente.urls')), path('preise/', include('vergabe_teilnahme.apps.preise.urls')), path('preise/vergleich/', preise_views.globaler_preisvergleich, name='preisvergleich'), path('partner/', include('vergabe_teilnahme.apps.partner.urls')), path('bibliothek/', include('vergabe_teilnahme.apps.bibliothek.urls')), path('marktbegleiter/', include('vergabe_teilnahme.apps.marktbegleiter.urls')), path('nachbetrachtung/', include('vergabe_teilnahme.apps.nachbetrachtung.urls')), path('feedback/', include('vergabe_teilnahme.apps.feedback.urls', namespace='feedback')), path('suche/', core_views.suche, name='suche'), # Freigaben path('freigaben/modal/', core_views.freigabe_modal, name='freigabe_modal'), path('freigaben/erteilen/', core_views.freigabe_erteilen, name='freigabe_erteilen'), # Admin — Feldkonfiguration path('felder//', core_views.feld_konfiguration_liste, name='feld_konfiguration_liste'), path('felder///toggle/', core_views.feld_konfiguration_toggle, name='feld_konfiguration_toggle'), # CustomAttributes path('core/attrs///', core_views.custom_attributes_panel, name='custom_attributes_panel'), path('core/attrs///neu/', core_views.custom_attribute_neu, name='custom_attribute_neu'), path('core/attrs////bearbeiten/', core_views.custom_attribute_bearbeiten, name='custom_attribute_bearbeiten'), path('core/attrs////loeschen/', core_views.custom_attribute_loeschen, name='custom_attribute_loeschen'), path('core/attrs////sort/', core_views.custom_attribute_sort, name='custom_attribute_sort'), ] if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)