We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b860828 commit c2f737eCopy full SHA for c2f737e
welcome/views.py
@@ -9,6 +9,7 @@
9
# Create your views here.
10
11
def index(request):
12
+ """Takes an request object as a parameter and creates an pageview object then responds by rendering the index view."""
13
hostname = os.getenv('HOSTNAME', 'unknown')
14
PageView.objects.create(hostname=hostname)
15
@@ -19,4 +20,5 @@ def index(request):
19
20
})
21
22
def health(request):
23
+ """Takes an request as a parameter and gives the count of pageview objects as reponse"""
24
return HttpResponse(PageView.objects.count())
0 commit comments