File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 8
8
from django .core .exceptions import ImproperlyConfigured
9
9
from django .core .mail import send_mail
10
10
from django .db import connection
11
+ from django .http import HttpResponse
11
12
from django .urls import re_path
12
13
from django .views .static import serve
13
14
from drf_recaptcha .fields import ReCaptchaV3Field
@@ -56,6 +57,10 @@ def post(self, request):
56
57
return Response (data = {}, status = status .HTTP_400_BAD_REQUEST )
57
58
58
59
60
+ def health_check (response ):
61
+ return HttpResponse ('Ok' )
62
+
63
+
59
64
class CachedListModelMixin :
60
65
"""
61
66
List a queryset. Result is fetched from cache or updates it if it doesn't exist.
Original file line number Diff line number Diff line change
1
+ from apps .shared import views as shared_views
1
2
from apps .shared .views import static_override
2
3
from django .conf import settings
3
4
from django .contrib import admin
13
14
# packages
14
15
path ('drivebc-cms/' , include ("apps.cms.urls" )),
15
16
17
+ # misc
18
+ path ("healthcheck/" , shared_views .health_check , name = "health_check" ),
19
+
16
20
# TO BE REMOVED IN PRODUCTION
17
21
] + static_override (settings .MEDIA_URL , document_root = settings .MEDIA_ROOT )
18
22
19
23
if settings .DEV_ENVIRONMENT :
20
24
from django .views .static import serve
21
25
urlpatterns .append (re_path (r"^images/(?P<path>.*)$" , serve , {
22
26
"document_root" : f'{ settings .SRC_DIR } /images/webcams' ,
23
- }))
27
+ }))
You can’t perform that action at this time.
0 commit comments