todolist.urls   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 22
dl 0
loc 31
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A health_check() 0 3 1
1
from django.contrib import admin
2
from django.urls import path, include
3
from django.conf import settings
4
from django.conf.urls.static import static
5
from rest_framework.decorators import api_view
6
from rest_framework.response import Response
7
8
9
@api_view(['GET'])
10
def health_check(request):
11
    return Response({'status': 'OK'})
12
13
14
urlpatterns = [
15
    path('admin/', admin.site.urls),
16
    path('bot/', include('bot.urls')),
17
    path('core/', include('core.urls')),
18
    path('goals/', include('goals.urls')),
19
    path('oauth/', include('social_django.urls', namespace='social')),
20
    path('ping/', health_check, name='health-check')
21
]
22
23
if settings.DEBUG:
24
    urlpatterns += [
25
        path('api-auth/', include('rest_framework.urls')),
26
27
        # URLs Debug Toolbar
28
        path('__debug__/', include('debug_toolbar.urls')),
29
    ]
30
    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
31