blob: c5582ec08f7db53be1709c1719e8e2cc71703b26 (
plain) (
blame)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 | from rest_framework.response import Response
from rest_framework.views import APIView
class HealthcheckView(APIView):
    """
    Provides a simple view to check that the website is alive and well.
    ## Routes
    ### GET /healthcheck
    Returns a simple JSON document showcasing whether the system is working:
    >>> {
    ...     'status': 'ok'
    ... }
    Seems to be.
    ## Authentication
    Does not require any authentication nor permissions..
    """
    authentication_classes = ()
    permission_classes = ()
    def get(self, request, format=None):  # noqa
        return Response({'status': 'ok'})
 |