generated from bisco/codex-bootstrap
24 lines
654 B
Python
24 lines
654 B
Python
from django.contrib import admin
|
|
from django.conf import settings
|
|
from django.conf.urls.static import static
|
|
from django.urls import include, path
|
|
from rest_framework.decorators import api_view
|
|
from rest_framework.response import Response
|
|
|
|
|
|
@api_view(["GET"])
|
|
def health(request):
|
|
return Response({"status": "ok"})
|
|
|
|
|
|
urlpatterns = [
|
|
path("admin/", admin.site.urls),
|
|
path("api/health/", health, name="health"),
|
|
path("api/", include("shows.urls")),
|
|
path("api/", include("bookings.urls")),
|
|
path("api/", include("checkins.urls")),
|
|
]
|
|
|
|
if settings.DEBUG:
|
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|