build fixes and static files fix, closes #28

This commit is contained in:
badblocks 2025-04-19 17:10:46 -07:00
parent bff2525c65
commit 6a44ef30a3
26 changed files with 91 additions and 39 deletions

View file

@ -1,7 +1,9 @@
from django.urls import path
from .views import HomePageView
from .views import HomePageView, HealthCheckView
urlpatterns = [
path("", HomePageView.as_view(), name="home"),
path("health", HealthCheckView.as_view(), name="health"),
path("health/", HealthCheckView.as_view(), name="health"),
]

View file

@ -10,7 +10,8 @@ from django.utils.decorators import method_decorator
from django.template.response import TemplateResponse
from django.http import HttpResponseRedirect
import logging
#from silk.profiling.profiler import silk_profile
from django.views import View
from django.http import HttpResponse
logger = logging.getLogger(__name__)
@ -113,4 +114,8 @@ class HomePageView(TemplateView):
def get(self, request, *args, **kwargs):
"""Override get method to add caching"""
return super().get(request, *args, **kwargs)
return super().get(request, *args, **kwargs)
class HealthCheckView(View):
def get(self, request, *args, **kwargs):
return HttpResponse("OK/HEALTHY")