register and sign in pages

This commit is contained in:
2026-09-22 00:50:30 +05:00
parent f313867653
commit 78d04f75d1
96 changed files with 6383 additions and 109 deletions
+17
View File
@@ -0,0 +1,17 @@
from django.db import connection
from rest_framework.decorators import api_view, authentication_classes, permission_classes
from rest_framework.response import Response
@api_view(["GET"])
@authentication_classes([])
@permission_classes([])
def healthcheck(request):
"""Liveness + database reachability, for compose/nginx health probes."""
try:
with connection.cursor() as cursor:
cursor.execute("SELECT 1")
database = "up"
except Exception: # pragma: no cover - reported, not raised
database = "down"
return Response({"status": "ok", "database": database})