from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import include, path from apps.core.views import HealthView from apps.library.views import RandomItemView urlpatterns = [ path("admin/", admin.site.urls), path("api/auth/", include("apps.accounts.urls")), path("api/", include("apps.accounts.api_urls")), path("api/", include("apps.core.urls")), path("api/", include("apps.library.urls")), path("api/", include("apps.follows.urls")), # Liveness probe for uptime monitors (no /api prefix, no auth). path("health", HealthView.as_view(), name="health"), path("health/", HealthView.as_view()), # Short alias for shell greeting scripts (fish_greeting + fastfetch); # /api/random/ is the canonical path. path("random", RandomItemView.as_view(), name="random"), path("random/", RandomItemView.as_view()), ] if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)