release: prepare Hulumath v1.2.0
This commit is contained in:
@@ -1,14 +1,21 @@
|
||||
from django.conf import settings
|
||||
from django.db import connection
|
||||
from django.http import JsonResponse
|
||||
from django.shortcuts import render
|
||||
|
||||
|
||||
def home(request):
|
||||
return render(request, "index.html")
|
||||
return render(request, "index.html", {"app_version": settings.APP_VERSION})
|
||||
|
||||
|
||||
def health(request):
|
||||
with connection.cursor() as cursor:
|
||||
cursor.execute("SELECT 1")
|
||||
cursor.fetchone()
|
||||
return JsonResponse({"status": "ok", "database": "ok"})
|
||||
return JsonResponse(
|
||||
{
|
||||
"status": "ok",
|
||||
"database": "ok",
|
||||
"version": settings.APP_VERSION,
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user