views.py 370 B

123456789101112
  1. from django.conf import settings
  2. from django.http import HttpResponse
  3. from django.shortcuts import render
  4. async def health(request):
  5. return HttpResponse("ok", content_type="text/plain")
  6. def index(request, *args):
  7. base_path = settings.FORCE_SCRIPT_NAME if settings.FORCE_SCRIPT_NAME else "/"
  8. return render(request, "index.html", {"base_path": base_path})