Healthcheck app
This commit is contained in:
parent
404aa3680f
commit
48c4a725a4
1
apps/health/__init__.py
Normal file
1
apps/health/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
# -*- encoding: utf-8 -*-
|
3
apps/health/admin.py
Normal file
3
apps/health/admin.py
Normal file
@ -0,0 +1,3 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
from django.contrib import admin
|
8
apps/health/config.py
Normal file
8
apps/health/config.py
Normal file
@ -0,0 +1,8 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class HealthConfig(AppConfig):
|
||||
name = 'apps.health'
|
||||
label = 'apps_health'
|
0
apps/health/migrations/__init__.py
Normal file
0
apps/health/migrations/__init__.py
Normal file
3
apps/health/models.py
Normal file
3
apps/health/models.py
Normal file
@ -0,0 +1,3 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
from django.db import models
|
3
apps/health/tests.py
Normal file
3
apps/health/tests.py
Normal file
@ -0,0 +1,3 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
from django.test import TestCase
|
9
apps/health/urls.py
Normal file
9
apps/health/urls.py
Normal file
@ -0,0 +1,9 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
from django.urls import path
|
||||
|
||||
from .views import HealthCheck
|
||||
|
||||
urlpatterns = [
|
||||
path("", HealthCheck.as_view(), name="check"),
|
||||
]
|
9
apps/health/views.py
Normal file
9
apps/health/views.py
Normal file
@ -0,0 +1,9 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
from django.http import HttpResponse
|
||||
from django.views.generic import View
|
||||
|
||||
|
||||
class HealthCheck(View):
|
||||
def get(self, request, *args, **kwargs):
|
||||
return HttpResponse("healthy")
|
@ -36,7 +36,8 @@ INSTALLED_APPS = [
|
||||
"django_filters",
|
||||
'apps.api',
|
||||
'apps.home',
|
||||
'apps.authentication'
|
||||
'apps.authentication',
|
||||
"apps.health"
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
|
@ -8,6 +8,7 @@ from django.urls import path, include # add this
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path("api/", include(("apps.api.urls", "apps.api"), namespace="api")),
|
||||
path("health/", include(("apps.health.urls", "apps.health"), namespace="health")),
|
||||
|
||||
# ADD NEW Routes HERE
|
||||
*static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT),
|
||||
|
Loading…
x
Reference in New Issue
Block a user