vergabe-teilnahme/vergabe_teilnahme/urls.py

55 lines
2.9 KiB
Python
Raw Normal View History

2026-05-08 14:26:48 +02:00
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
2026-05-11 12:23:20 +02:00
from vergabe_teilnahme.apps.preise import views as preise_views
2026-05-08 14:26:48 +02:00
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')),
2026-05-08 17:43:23 +02:00
path('aufgaben/', include('vergabe_teilnahme.apps.aufgaben.global_urls')),
2026-05-08 14:26:48 +02:00
path('dokumente/', include('vergabe_teilnahme.apps.dokumente.urls')),
path('preise/', include('vergabe_teilnahme.apps.preise.urls')),
2026-05-11 12:23:20 +02:00
path('preise/vergleich/', preise_views.globaler_preisvergleich, name='preisvergleich'),
2026-05-08 14:26:48 +02:00
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/<str:entity_type>/', core_views.feld_konfiguration_liste, name='feld_konfiguration_liste'),
path('felder/<str:entity_type>/<str:field_name>/toggle/', core_views.feld_konfiguration_toggle, name='feld_konfiguration_toggle'),
# CustomAttributes
path('core/attrs/<int:content_type_id>/<int:object_id>/', core_views.custom_attributes_panel, name='custom_attributes_panel'),
path('core/attrs/<int:content_type_id>/<int:object_id>/neu/', core_views.custom_attribute_neu, name='custom_attribute_neu'),
path('core/attrs/<int:content_type_id>/<int:object_id>/<int:attr_pk>/bearbeiten/', core_views.custom_attribute_bearbeiten, name='custom_attribute_bearbeiten'),
path('core/attrs/<int:content_type_id>/<int:object_id>/<int:attr_pk>/loeschen/', core_views.custom_attribute_loeschen, name='custom_attribute_loeschen'),
path('core/attrs/<int:content_type_id>/<int:object_id>/<int:attr_pk>/sort/', core_views.custom_attribute_sort, name='custom_attribute_sort'),
2026-05-08 14:26:48 +02:00
]
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)